[Fix] Fixed the orthorgraphic view bug Tamir introduced.

This commit is contained in:
Rtch90 2012-04-15 13:42:10 +01:00
parent e6f773dd68
commit d57835d806

View File

@ -31,6 +31,7 @@ void Destroy(void) {
static void ResizeWindow(Game& game, int w, int h) {
SDL_SetVideoMode(w, h, 32, SDL_OPENGL | SDL_RESIZABLE);
game.OnResize(w, h);
SDL_GL_SwapBuffers();
}
@ -93,6 +94,11 @@ int main(int argc, char** argv) {
Uint32 timeStart = SDL_GetTicks();
float dt = 1.0f / 60.0f;
// We need to give windowWidth and windowHeight an initial value
// Otherwise it is just garbage, and the orthorgraphic view
// screws up for me. -- Allanis.
game.OnResize(windowWidth, windowHeight);
bool isRunning = true;
while(isRunning) {