1
0
mirror of https://git.dev.opencascade.org/repos/occt.git synced 2025-04-16 10:08:36 +03:00

0023035: TKOpenGl redesign regression caused by destruction of global OpenGl_Display instance

Do not destroy global openglDisplay instance
This commit is contained in:
kgv 2012-03-22 14:30:31 +04:00
parent d5e4971b17
commit 0003c4b287
2 changed files with 5 additions and 2 deletions

View File

@ -69,7 +69,10 @@ Standard_Boolean OpenGl_GraphicDriver::Begin (const Aspect_Display ADisplay)
void OpenGl_GraphicDriver::End () void OpenGl_GraphicDriver::End ()
{ {
openglDisplay.Nullify(); // This is unsafe to realease global object here
// because noone guaranteed that only one instance of OpenGl_GraphicDriver is used!
// So we disable this destructor here until openglDisplay not moved to OpenGl_GraphicDriver class definition.
///openglDisplay.Nullify();
} }
//======================================================================= //=======================================================================

View File

@ -85,7 +85,7 @@ EvalViewMappingMatrix( tel_view_mapping mapping /* View Mapping */,
} }
/* prp between front and back planes */ /* prp between front and back planes */
if (!openglDisplay.IsNull() || !openglDisplay->Walkthrough()) if (openglDisplay.IsNull() || !openglDisplay->Walkthrough())
{ {
if( mapping->prp[2] < mapping->fpd && if( mapping->prp[2] < mapping->fpd &&
mapping->prp[2] > mapping->bpd ) mapping->prp[2] > mapping->bpd )