1
0
mirror of https://git.dev.opencascade.org/repos/occt.git synced 2025-08-14 13:30:48 +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

@@ -114,22 +114,8 @@ void Visual3d_View::SetWindow (const Handle(Aspect_Window)& theWindow)
MyWindow = theWindow;
MyCView.WsId = MyCView.ViewId;
MyCView.DefWindow.IsDefined = 1;
#if defined(_WIN32)
const Handle(WNT_Window) aWin = Handle(WNT_Window)::DownCast (theWindow);
MyCView.DefWindow.XWindow = (HWND )(aWin->HWindow());
MyCView.DefWindow.XParentWindow = (HWND )(aWin->HParentWindow());
#elif (defined(__APPLE__) && !defined(MACOSX_USE_GLX))
const Handle(Cocoa_Window) aWin = Handle(Cocoa_Window)::DownCast (theWindow);
MyCView.DefWindow.XWindow = (Aspect_Drawable )aWin->HView();
MyCView.DefWindow.XParentWindow = NULL;
//MyCView.DefWindow.XParentWindow = aWin->HParentWindow();
#elif defined(__ANDROID__)
//
#else
const Handle(Xw_Window) aWin = Handle(Xw_Window)::DownCast (theWindow);
MyCView.DefWindow.XWindow = aWin->XWindow();
//MyCView.DefWindow.XParentWindow = aWin->XParentWindow();
#endif
MyCView.DefWindow.XWindow = theWindow->NativeHandle();
MyCView.DefWindow.XParentWindow = theWindow->NativeParentHandle();
Standard_Integer Width, Height;
theWindow->Size (Width, Height);