comparison src/video/SDL_renderer_gl.c @ 3264:8fe0806637df

Fixed bug #783 Fixed coordinate positioning with OpenGL renderer, and added a test case
author Sam Lantinga <slouken@libsdl.org>
date Sat, 19 Sep 2009 05:12:26 +0000
parents e3d33bd599eb
children 1ed5d432e468
comparison
equal deleted inserted replaced
3263:924b486541dc 3264:8fe0806637df
448 data->glMatrixMode(GL_PROJECTION); 448 data->glMatrixMode(GL_PROJECTION);
449 data->glLoadIdentity(); 449 data->glLoadIdentity();
450 data->glMatrixMode(GL_MODELVIEW); 450 data->glMatrixMode(GL_MODELVIEW);
451 data->glLoadIdentity(); 451 data->glLoadIdentity();
452 data->glViewport(0, 0, window->w, window->h); 452 data->glViewport(0, 0, window->w, window->h);
453 data->glOrtho(0.0, (GLdouble) window->w, (GLdouble) window->h, 0.0, 453 data->glOrtho(-0.5, (GLdouble) window->w-0.5,
454 0.0, 1.0); 454 (GLdouble) window->h-0.5, -0.5, 0.0, 1.0);
455 data->updateSize = SDL_FALSE; 455 data->updateSize = SDL_FALSE;
456 } 456 }
457 return 0; 457 return 0;
458 } 458 }
459 459