[Fix] Forgot to push the matrix stack.
This commit is contained in:
		
							parent
							
								
									cc47d41137
								
							
						
					
					
						commit
						93fbf84c80
					
				| @ -40,7 +40,7 @@ int main(int argc, const char** argv) { | |||||||
|       switch(event.type) { |       switch(event.type) { | ||||||
|       case SDL_KEYDOWN: |       case SDL_KEYDOWN: | ||||||
|         switch(event.key.keysym.sym) { |         switch(event.key.keysym.sym) { | ||||||
|           case SDLK_q: |           case SDLK_ESCAPE: | ||||||
|             quit = 1; |             quit = 1; | ||||||
|             break; |             break; | ||||||
|           case SDLK_a: |           case SDLK_a: | ||||||
|  | |||||||
| @ -175,6 +175,7 @@ void gl_free(gl_texture* texture) { | |||||||
| // Blit the sprite at given position.
 | // Blit the sprite at given position.
 | ||||||
| void gl_blitSprite(gl_texture* sprite, Vec2* pos, const int sx, const int sy) { | void gl_blitSprite(gl_texture* sprite, Vec2* pos, const int sx, const int sy) { | ||||||
|   glMatrixMode(GL_TEXTURE); |   glMatrixMode(GL_TEXTURE); | ||||||
|  |   glPushMatrix(); | ||||||
|   glTranslatef(sprite->sw * (FP)(sx)/sprite->rw, |   glTranslatef(sprite->sw * (FP)(sx)/sprite->rw, | ||||||
|         sprite->sh*(sprite->sy-(FP)sy-1)/sprite->rh, 0.0f); |         sprite->sh*(sprite->sy-(FP)sy-1)/sprite->rh, 0.0f); | ||||||
| 
 | 
 | ||||||
|  | |||||||
		Loading…
	
		Reference in New Issue
	
	Block a user
	 Allanis
						Allanis