make sure gl functions are not called before OpenGL is initialised, when fullscreen switching

This commit is contained in:
kreatordxx 2007-05-23 11:34:53 +00:00
parent 8348ed9bac
commit 0de587cadf
2 changed files with 5 additions and 1 deletions

View file

@ -1,5 +1,9 @@
D2X-Rebirth Changelog
20070523
--------
arch/ogl/gr.c: make sure gl functions are not called before OpenGL is initialised, when fullscreen switching
20070522
--------
SConstruct: Added conditions to add compiler/linker flags from user's environemnt if they have any set.

View file

@ -89,7 +89,7 @@ int gr_toggle_fullscreen(void){
gr_do_fullscreen(!ogl_fullscreen);
// grd_curscreen->sc_mode=0;//hack to get it to reset screen mode
if (Screen_mode != SCREEN_GAME) // update viewing values for menus
if (gl_initialized && Screen_mode != SCREEN_GAME) // update viewing values for menus
{
glMatrixMode(GL_PROJECTION);
glLoadIdentity();