1
0
mirror of https://git.dev.opencascade.org/repos/occt.git synced 2025-08-04 13:13:25 +03:00

0026732: Visualization, TKOpenGl - add option to request Core profile 3.2+ using GLX

Aspect_Window::NativeFBConfig() - extend interface with new method.
Xw_Window - add Aspect_FBConfig option to constructors,
use glXChooseFBConfig() instead of glXChooseVisual() on GLX1.3+.

OpenGl_Window - create context using glXCreateContextAttribsARB()
when GLXFBConfig is provided by Aspect_Window.
This procedure now handles Core Profile and Debug Context options on Linux.

OpenGl_Window - drop code implicitly creating child window
when window XVisual is incomplete for OpenGL context.
This should eliminate event-handling issues at application side,
but would require window to be properly created by application.
This commit is contained in:
kgv
2015-09-29 10:15:32 +03:00
committed by bugmaster
parent a7197ef3c7
commit b6bf4ec174
8 changed files with 261 additions and 254 deletions

View File

@@ -87,32 +87,32 @@ public:
}
//! Opens the window <me>
Standard_EXPORT virtual void Map() const;
Standard_EXPORT virtual void Map() const Standard_OVERRIDE;
//! Closes the window <me>
Standard_EXPORT virtual void Unmap() const;
Standard_EXPORT virtual void Unmap() const Standard_OVERRIDE;
//! Applies the resizing to the window <me>
Standard_EXPORT virtual Aspect_TypeOfResize DoResize() const;
Standard_EXPORT virtual Aspect_TypeOfResize DoResize() const Standard_OVERRIDE;
//! Apply the mapping change to the window <me>
Standard_EXPORT virtual Standard_Boolean DoMapping() const;
Standard_EXPORT virtual Standard_Boolean DoMapping() const Standard_OVERRIDE;
//! Returns True if the window <me> is opened
Standard_EXPORT virtual Standard_Boolean IsMapped() const;
Standard_EXPORT virtual Standard_Boolean IsMapped() const Standard_OVERRIDE;
//! Returns The Window RATIO equal to the physical WIDTH/HEIGHT dimensions
Standard_EXPORT virtual Quantity_Ratio Ratio() const;
Standard_EXPORT virtual Quantity_Ratio Ratio() const Standard_OVERRIDE;
//! Returns The Window POSITION in PIXEL
Standard_EXPORT virtual void Position (Standard_Integer& X1,
Standard_Integer& Y1,
Standard_Integer& X2,
Standard_Integer& Y2) const;
Standard_Integer& Y2) const Standard_OVERRIDE;
//! Returns The Window SIZE in PIXEL
Standard_EXPORT virtual void Size (Standard_Integer& theWidth,
Standard_Integer& theHeight) const;
Standard_Integer& theHeight) const Standard_OVERRIDE;
#if defined(TARGET_OS_IPHONE) && TARGET_OS_IPHONE
//! @return associated UIView
@@ -129,17 +129,20 @@ public:
#endif
//! @return native Window handle
virtual Aspect_Drawable NativeHandle() const
virtual Aspect_Drawable NativeHandle() const Standard_OVERRIDE
{
return (Aspect_Drawable )HView();
}
//! @return parent of native Window handle
virtual Aspect_Drawable NativeParentHandle() const
virtual Aspect_Drawable NativeParentHandle() const Standard_OVERRIDE
{
return 0;
}
//! Returns nothing on OS X
virtual Aspect_FBConfig NativeFBConfig() const Standard_OVERRIDE { return NULL; }
protected:
#if defined(TARGET_OS_IPHONE) && TARGET_OS_IPHONE