0030364: Visualization, TKOpenGl - allow initializing a Surface-less EGL context
authorkgv <kgv@opencascade.com>
Mon, 12 Nov 2018 12:46:40 +0000 (15:46 +0300)
committersan <san@opencascade.com>
Sun, 23 Dec 2018 17:25:14 +0000 (20:25 +0300)
commit39235bedc64501f212d90102730a9d144c3c9b7d
treed89369ee73399b9f185b2d6ebcb191a8e314bd5f
parent4473e336553277b039276db0e9c274974828175b
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).
src/OpenGl/OpenGl_Context.cxx
src/OpenGl/OpenGl_GraphicDriver.cxx
src/OpenGl/OpenGl_Window.cxx
src/V3d/V3d_View.cxx
src/V3d/V3d_Viewer.cxx