Skip to content

Commit

Permalink
Fix published region area
Browse files Browse the repository at this point in the history
  • Loading branch information
rsodre committed Mar 31, 2015
1 parent e001573 commit c66e51c
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions SyphonServer.m
Original file line number Diff line number Diff line change
Expand Up @@ -475,17 +475,17 @@ - (void)publishFrameTexture:(GLuint)texID textureTarget:(GLenum)target imageRegi
{
if(!isFlipped)
{ // X // Y
tex_coords[0] = region.origin.x; tex_coords[1] = 0.0;
tex_coords[0] = region.origin.x; tex_coords[1] = region.origin.y;
tex_coords[2] = region.origin.x; tex_coords[3] = region.size.height + region.origin.y;
tex_coords[4] = region.size.width + region.origin.x; tex_coords[5] = region.size.height + region.origin.y;
tex_coords[6] = region.size.width + region.origin.x; tex_coords[7] = 0.0;
tex_coords[6] = region.size.width + region.origin.x; tex_coords[7] = region.origin.y;
}
else
{
tex_coords[0] = region.origin.x; tex_coords[1] = region.size.height + region.origin.y;
tex_coords[2] = region.origin.x; tex_coords[3] = region.origin.y;
tex_coords[4] = surfaceSize.width; tex_coords[5] = region.origin.y;
tex_coords[6] = surfaceSize.width; tex_coords[7] = region.size.height + region.origin.y;
tex_coords[4] = region.size.width + region.origin.x; tex_coords[5] = region.origin.y;
tex_coords[6] = region.size.width + region.origin.x; tex_coords[7] = region.size.height + region.origin.y;
}
}

Expand Down

0 comments on commit c66e51c

Please sign in to comment.