From 05d399c049f3f8a84bbc2e81f1636c911cec7e26 Mon Sep 17 00:00:00 2001 From: pixel Date: Mon, 17 Mar 2003 07:44:36 +0000 Subject: Widgets --- lib/glbase.cc | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) (limited to 'lib/glbase.cc') diff --git a/lib/glbase.cc b/lib/glbase.cc index 67b1b9c..3cdea12 100644 --- a/lib/glbase.cc +++ b/lib/glbase.cc @@ -25,7 +25,8 @@ int mogltk::glbase::setup(int w, int h, int flags) throw(GeneralException) { throw GeneralException(String("Couldn't initialise Video SubSystem: ") + SDL_GetError()); } - if (!(surface = SDL_SetVideoMode(width, height, 0, flags | SDL_OPENGL))) { + if (!(surface = SDL_SetVideoMode(width, height, 0, flags | SDL_OPENGL | SDL_FULLSCREEN))) { +// if (!(surface = SDL_SetVideoMode(1024, 768, 0, flags | SDL_OPENGL))) { throw GeneralException(String("Couldn't set GL mode: ") + SDL_GetError()); } @@ -68,7 +69,8 @@ int mogltk::glbase::setup(int w, int h, int flags) throw(GeneralException) { glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT); SDL_ShowCursor(0); - Flip(); + SDL_GL_SwapBuffers(); + glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT); return 0; } @@ -122,9 +124,10 @@ void mogltk::glbase::Leave2DMode(void) { } void mogltk::glbase::Flip() { + printm(M_INFO, "Flipping\n"); + mogltk::engine::pollevents(); SDL_GL_SwapBuffers(); glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT); - mogltk::engine::pollevents(); } bool mogltk::glbase::is2D() { -- cgit v1.2.3