1
0
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:
kgv
2018-11-12 15:46:40 +03:00
committed by san
parent 4473e33655
commit 39235bedc6
5 changed files with 112 additions and 40 deletions

View File

@@ -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();
}
}
//=============================================================================