diff options
author | Kyle K <kylek389@gmail.com> | 2010-09-28 13:18:01 -0500 |
---|---|---|
committer | Kamil Kaminski <kamilkss@gmail.com> | 2010-09-28 13:18:01 -0500 |
commit | 457a9b1fa973653e3bfb5cf8c5be334c4a6797fd (patch) | |
tree | a7f0a940a464a4586de08eada620505c8d8efe29 | |
parent | a1b760ec22d8c313ce2f5fbe29c48f095a5feee0 (diff) | |
download | GLPyramid-457a9b1fa973653e3bfb5cf8c5be334c4a6797fd.tar.gz GLPyramid-457a9b1fa973653e3bfb5cf8c5be334c4a6797fd.tar.bz2 GLPyramid-457a9b1fa973653e3bfb5cf8c5be334c4a6797fd.zip |
pyramid: fix the SDL_SetVideoMode() on window resize
-rw-r--r-- | sdl/pyramid.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/sdl/pyramid.c b/sdl/pyramid.c index c31531c..dd15225 100644 --- a/sdl/pyramid.c +++ b/sdl/pyramid.c @@ -28,6 +28,9 @@ static void resize(int w, int h) glMatrixMode(GL_MODELVIEW); glLoadIdentity(); + + /* this needs to be ran again, glut does it for you I suppose */ + SDL_SetVideoMode(w, h, 32, SDL_OPENGL | SDL_GL_DOUBLEBUFFER | SDL_RESIZABLE); } static void SetupRC() @@ -123,7 +126,7 @@ void processEvents() } case SDL_VIDEORESIZE: { resize(event.resize.w, event.resize.h); break; } case SDL_QUIT: { printf("status: exiting...\n"); exit(0); break; } - default: + default: break; } } } |