[Fix] Forgot to push the matrix stack.

This commit is contained in:
Allanis 2013-01-30 23:40:27 +00:00
parent cc47d41137
commit 93fbf84c80
2 changed files with 2 additions and 1 deletions

View File

@ -40,7 +40,7 @@ int main(int argc, const char** argv) {
switch(event.type) {
case SDL_KEYDOWN:
switch(event.key.keysym.sym) {
case SDLK_q:
case SDLK_ESCAPE:
quit = 1;
break;
case SDLK_a:

View File

@ -175,6 +175,7 @@ void gl_free(gl_texture* texture) {
// Blit the sprite at given position.
void gl_blitSprite(gl_texture* sprite, Vec2* pos, const int sx, const int sy) {
glMatrixMode(GL_TEXTURE);
glPushMatrix();
glTranslatef(sprite->sw * (FP)(sx)/sprite->rw,
sprite->sh*(sprite->sy-(FP)sy-1)/sprite->rh, 0.0f);