1
0
mirror of https://git.dev.opencascade.org/repos/occt.git synced 2025-09-03 14:10:33 +03:00

0025147: Visualization, TKOpenGl - support EGL as alternative to GLX

Aspect_Window - add interface methods NativeHandle() and NativeParentHandle().
OpenGl_Window - pass OpenGl_GraphicDriver instance to the constructor.
OpenGl_Caps - add option to disable buffers swap at the end of frame redraw.
This commit is contained in:
kgv
2014-10-02 13:43:33 +04:00
committed by bugmaster
parent 6b62b2da81
commit 25b97fac40
15 changed files with 297 additions and 39 deletions

View File

@@ -133,12 +133,12 @@ void OpenGl_Material::Init (const OPENGL_SURF_PROP& theProp)
// function : OpenGl_Workspace
// purpose :
// =======================================================================
OpenGl_Workspace::OpenGl_Workspace (const Handle(Aspect_DisplayConnection)& theDisplayConnection,
OpenGl_Workspace::OpenGl_Workspace (const Handle(OpenGl_GraphicDriver)& theDriver,
const CALL_DEF_WINDOW& theCWindow,
Aspect_RenderingContext theGContext,
const Handle(OpenGl_Caps)& theCaps,
const Handle(OpenGl_Context)& theShareCtx)
: OpenGl_Window (theDisplayConnection, theCWindow, theGContext, theCaps, theShareCtx),
: OpenGl_Window (theDriver, theCWindow, theGContext, theCaps, theShareCtx),
NamedStatus (0),
HighlightColor (&THE_WHITE_COLOR),
//
@@ -589,7 +589,7 @@ void OpenGl_Workspace::Redraw (const Graphic3d_CView& theCView,
// fetch OpenGl context state
aGlCtx->FetchState();
Tint toSwap = (aGlCtx->IsRender()); // swap buffers
Tint toSwap = (aGlCtx->IsRender() && !aGlCtx->caps->buffersNoSwap) ? 1 : 0; // swap buffers
GLint aViewPortBack[4];
OpenGl_FrameBuffer* aFrameBuffer = (OpenGl_FrameBuffer* )theCView.ptrFBO;
if (aFrameBuffer != NULL)