1
0
mirror of https://git.dev.opencascade.org/repos/occt.git synced 2025-08-09 13:22:24 +03:00

0024228: TKOpenGL - destroy GL context at view close

- OpenGl_Display - release GL resources correctly on closing views
- OpenGl_AspectFace, OpenGl_AspectText, OpenGl_AspectLine, OpenGl_AspectMarker - initialize OpenGl resources on demand, when context is available.
- Graphic3d_TextureRoot - use const modifier for GetId method to avoid asynchronous resource state at OpenGl.
- Do not call OpenGL functions if no active GL context has been left
- Reset thread's context before deletion for Mesa WNT
This commit is contained in:
apl
2013-10-24 12:53:42 +04:00
committed by abv
parent ab2db9a59e
commit fd4a696350
42 changed files with 956 additions and 624 deletions

View File

@@ -79,7 +79,7 @@ void OpenGl_CappingPlaneResource::UpdateAspect (const Handle(OpenGl_Context)& th
if (myAspectMod == myPlaneRoot->MCountAspect())
return; // noting to update
myAspect->Init (theContext, aCappingAsp);
myAspect->SetAspect (aCappingAsp);
myAspectMod = myPlaneRoot->MCountAspect();
return;
}
@@ -96,7 +96,7 @@ void OpenGl_CappingPlaneResource::UpdateAspect (const Handle(OpenGl_Context)& th
if (myAspect == NULL && !aCappingAsp.IsNull())
{
myAspect = new OpenGl_AspectFace();
myAspect->Init (theContext, aCappingAsp);
myAspect->SetAspect (aCappingAsp);
myAspectMod = myPlaneRoot->MCountAspect();
}
}