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 );
|
gluDeleteTess( tesselator );
|
||||||
ClearCache();
|
ClearCache();
|
||||||
|
|
||||||
if( IsShown() )
|
#ifdef __LINUX__
|
||||||
|
if( IsShownOnScreen() )
|
||||||
SetCurrent( *OPENGL_GAL::glContext );
|
SetCurrent( *OPENGL_GAL::glContext );
|
||||||
|
#else
|
||||||
|
SetCurrent( *OPENGL_GAL::glContext );
|
||||||
|
#endif
|
||||||
|
|
||||||
glFlush();
|
glFlush();
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue