X-Git-Url: https://git.jsancho.org/?a=blobdiff_plain;f=Source%2FOpenGL_Windows.cpp;h=cc8103ce8e80e7cfbbf61f4093006d0c421c3aea;hb=710fa624080c2f2db7923832e2fd9945f4dd8254;hp=c74939ec77a30f3472b2e3c6e9aece7263eb7561;hpb=386dc30166871cd37cc4619c9c9b8bbd4ae3bcf8;p=lugaru.git diff --git a/Source/OpenGL_Windows.cpp b/Source/OpenGL_Windows.cpp index c74939e..cc8103c 100644 --- a/Source/OpenGL_Windows.cpp +++ b/Source/OpenGL_Windows.cpp @@ -236,8 +236,6 @@ void initGL(){ fprintf(stderr, "Failed to initialize stereo, disabling.\n"); stereomode = stereoNone; } - - //TODO: load textures here } static void toggleFullscreen(){ @@ -248,7 +246,13 @@ static void toggleFullscreen(){ screen=SDL_SetVideoMode(0,0,0,flags); if(!screen) exit(1); + //reload opengl state initGL(); + for(std::vector::iterator it=Game::textures.begin(); it!=Game::textures.end(); it++){ + it->load(); + } + pgame->text.BuildFont(); + pgame->LoadScreenTexture(); } static void sdlEventProc(const SDL_Event &e, Game &game){ @@ -358,8 +362,9 @@ Boolean SetUp (Game & game) } Uint32 sdlflags = SDL_OPENGL; - if (!cmdline("windowed")) - sdlflags |= SDL_FULLSCREEN; + //TODO: commented out temporarily + //if (!cmdline("windowed")) + //sdlflags |= SDL_FULLSCREEN; SDL_WM_SetCaption("Lugaru", "Lugaru");