mirror of
https://git.dev.opencascade.org/repos/occt.git
synced 2025-09-03 14:10:33 +03:00
0030364: Visualization, TKOpenGl - allow initializing a Surface-less EGL context
OpenGl_Context::MakeCurrent()/OpenGl_Context::IsCurrent() have been modified to NOT fail in case if myWindow is EGL_NO_SURFACE (valid off-screen rendering case within EGL). OpenGl_GraphicDriver::InitEglContext() now finds EGL surface config in case if it has not been passed by argument. OpenGl_Window constructor now allows wrapping an off-screen rendering surface EGL_NO_SURFACE. However, it still creates a dummy surface eglCreatePbufferSurface() to workaround bugs in some GLES drivers (Vivante GC2000). V3d_View::SetWindow()/V3d_View::MustBeResized()/V3d_Viewer::SetViewOn() have been modified to avoid implicit View redraw (leading to undefined behavior/crashes in case if rendering should be done into default FBO defined right after V3d_View initialization).
This commit is contained in:
@@ -189,7 +189,10 @@ void V3d_View::SetWindow (const Handle(Aspect_Window)& theWindow,
|
||||
myView->SetWindow (theWindow, theContext);
|
||||
MyViewer->SetViewOn (this);
|
||||
SetRatio();
|
||||
Redraw();
|
||||
if (myImmediateUpdate)
|
||||
{
|
||||
Redraw();
|
||||
}
|
||||
}
|
||||
|
||||
//=============================================================================
|
||||
@@ -412,8 +415,10 @@ void V3d_View::MustBeResized()
|
||||
myView->Resized();
|
||||
|
||||
SetRatio();
|
||||
|
||||
Redraw();
|
||||
if (myImmediateUpdate)
|
||||
{
|
||||
Redraw();
|
||||
}
|
||||
}
|
||||
|
||||
//=============================================================================
|
||||
|
Reference in New Issue
Block a user