OpenGL GAL: Set context in destructor when possible (under Linux the window has to be visible).
This commit is contained in:
parent
d8ca03b362
commit
a42cb0ef8c
|
@ -130,8 +130,12 @@ OPENGL_GAL::~OPENGL_GAL()
|
|||
gluDeleteTess( tesselator );
|
||||
ClearCache();
|
||||
|
||||
if( IsShown() )
|
||||
#ifdef __LINUX__
|
||||
if( IsShownOnScreen() )
|
||||
SetCurrent( *OPENGL_GAL::glContext );
|
||||
#else
|
||||
SetCurrent( *OPENGL_GAL::glContext );
|
||||
#endif
|
||||
|
||||
glFlush();
|
||||
|
||||
|
|
Loading…
Reference in New Issue