Skip to content
This repository has been archived by the owner on Feb 11, 2021. It is now read-only.

Commit

Permalink
Fixed setting the orthographic projection when the viewport changes.
Browse files Browse the repository at this point in the history
  • Loading branch information
slouken committed Jan 28, 2012
1 parent 9c4c413 commit 9203459
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions src/render/opengles2/SDL_render_gles2.c
Expand Up @@ -266,6 +266,10 @@ GLES2_UpdateViewport(SDL_Renderer * renderer)

rdata->glViewport(renderer->viewport.x, renderer->viewport.y,
renderer->viewport.w, renderer->viewport.h);

if (rdata->current_program) {
GLES2_SetOrthographicProjection(renderer);
}
return 0;
}

Expand Down Expand Up @@ -555,9 +559,6 @@ GLES2_SetRenderTarget(SDL_Renderer * renderer, SDL_Texture * texture)
return -1;
}
}
if (data->current_program) {
GLES2_SetOrthographicProjection(renderer);
}
return 0;
}

Expand Down

0 comments on commit 9203459

Please sign in to comment.