Skip to content

Commit

Permalink
fixed bug if drawport origin is not zero
Browse files Browse the repository at this point in the history
  • Loading branch information
louisbraun committed Jul 17, 2016
1 parent a5ba215 commit 569fde5
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions openglosd.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -718,10 +718,10 @@ bool cOglCmdRenderFbToBufferFb::Execute(void) {
GLfloat x2 = x + fb->ViewportWidth(); //right
GLfloat y2 = y + fb->ViewportHeight(); //bottom

GLfloat texX1 = 0.0f;
GLfloat texY1 = 0.0f;
GLfloat texX2 = 1.0f;
GLfloat texY2 = 1.0f;
GLfloat texX1 = drawPortX / (GLfloat)fb->Width();
GLfloat texY1 = drawPortY / (GLfloat)fb->Height();
GLfloat texX2 = texX1 + 1.0f;
GLfloat texY2 = texY1 + 1.0f;

if (fb->Scrollable()) {
GLfloat pageHeight = (GLfloat)fb->ViewportHeight() / (GLfloat)fb->Height();
Expand Down

0 comments on commit 569fde5

Please sign in to comment.