|
Open CASCADE Technology 6.6.0
|
This class represents low-level wrapper over window with GL context. The window itself should be provided to constructor.
#include <OpenGl_Window.hxx>

Public Member Functions | |
| OpenGl_Window (const Handle< OpenGl_Display > &theDisplay, const CALL_DEF_WINDOW &theCWindow, Aspect_RenderingContext theGContext, const Handle< OpenGl_Context > &theShareCtx) | |
| Main constructor - prepare GL context for specified window. | |
| virtual | ~OpenGl_Window () |
| Destructor. | |
| void | Resize (const CALL_DEF_WINDOW &theCWindow) |
| Resizes the window. | |
| void | ReadDepths (const Standard_Integer theX, const Standard_Integer theY, const Standard_Integer theWidth, const Standard_Integer theHeight, float *theDepths) |
| Reads depth component for current scene into specified buffer. | |
| void | SetBackgroundColor (const Standard_ShortReal theR, const Standard_ShortReal theG, const Standard_ShortReal theB) |
| void | EnablePolygonOffset () const |
| void | DisablePolygonOffset () const |
| Standard_Integer | Width () const |
| Standard_Integer | Height () const |
| const TEL_COLOUR & | BackgroundColor () const |
| Standard_Boolean | Dither () const |
| Standard_Boolean | BackDither () const |
| const Handle< OpenGl_Display > & | GetDisplay () const |
| const Handle< OpenGl_Context > & | GetGlContext () const |
| GLCONTEXT | GetGContext () const |
| This method will be removed in future version! | |
Protected Member Functions | |
| void | Init () |
| Activates GL context and setup viewport. | |
| virtual Standard_Boolean | Activate () |
| Makes GL context for this window active in current thread. | |
| void | EnableFeatures () const |
| void | DisableFeatures () const |
| void | MakeFrontBufCurrent () const |
| Draw directly to the FRONT buffer. Can cause artifacts on the screen. | |
| void | MakeBackBufCurrent () const |
| Draw to BACK buffer. Normal and default state. | |
| void | MakeFrontAndBackBufCurrent () const |
| Draw simultaneously to BACK and FRONT buffers. Abnormal usage. | |
Protected Attributes | |
| Handle< OpenGl_Display > | myDisplay |
| Handle< OpenGl_Context > | myGlContext |
| Standard_Boolean | myOwnGContext |
| set to TRUE if GL context was not created by this class | |
| Standard_Integer | myWidth |
| Standard_Integer | myHeight |
| TEL_COLOUR | myBgColor |
| Standard_Boolean | myDither |
| Standard_Boolean | myBackDither |
| OpenGl_Window::OpenGl_Window | ( | const Handle< OpenGl_Display > & | theDisplay, |
| const CALL_DEF_WINDOW & | theCWindow, | ||
| Aspect_RenderingContext | theGContext, | ||
| const Handle< OpenGl_Context > & | theShareCtx | ||
| ) |
| virtual OpenGl_Window::~OpenGl_Window | ( | ) | [virtual] |
| virtual Standard_Boolean OpenGl_Window::Activate | ( | ) | [protected, virtual] |
Reimplemented in OpenGl_Workspace.
| Standard_Boolean OpenGl_Window::BackDither | ( | ) | const [inline] |
| const TEL_COLOUR& OpenGl_Window::BackgroundColor | ( | ) | const [inline] |
| void OpenGl_Window::DisableFeatures | ( | ) | const [protected] |
| void OpenGl_Window::DisablePolygonOffset | ( | ) | const |
| Standard_Boolean OpenGl_Window::Dither | ( | ) | const [inline] |
| void OpenGl_Window::EnableFeatures | ( | ) | const [protected] |
| void OpenGl_Window::EnablePolygonOffset | ( | ) | const |
| const Handle< OpenGl_Display >& OpenGl_Window::GetDisplay | ( | ) | const [inline] |
| GLCONTEXT OpenGl_Window::GetGContext | ( | ) | const |
| const Handle< OpenGl_Context >& OpenGl_Window::GetGlContext | ( | ) | const [inline] |
| Standard_Integer OpenGl_Window::Height | ( | ) | const [inline] |
| void OpenGl_Window::Init | ( | ) | [protected] |
| void OpenGl_Window::MakeBackBufCurrent | ( | ) | const [protected] |
| void OpenGl_Window::MakeFrontAndBackBufCurrent | ( | ) | const [protected] |
| void OpenGl_Window::MakeFrontBufCurrent | ( | ) | const [protected] |
| void OpenGl_Window::ReadDepths | ( | const Standard_Integer | theX, |
| const Standard_Integer | theY, | ||
| const Standard_Integer | theWidth, | ||
| const Standard_Integer | theHeight, | ||
| float * | theDepths | ||
| ) |
| void OpenGl_Window::Resize | ( | const CALL_DEF_WINDOW & | theCWindow | ) |
| void OpenGl_Window::SetBackgroundColor | ( | const Standard_ShortReal | theR, |
| const Standard_ShortReal | theG, | ||
| const Standard_ShortReal | theB | ||
| ) |
| Standard_Integer OpenGl_Window::Width | ( | ) | const [inline] |
Standard_Boolean OpenGl_Window::myBackDither [protected] |
TEL_COLOUR OpenGl_Window::myBgColor [protected] |
Handle< OpenGl_Display > OpenGl_Window::myDisplay [protected] |
Standard_Boolean OpenGl_Window::myDither [protected] |
Handle< OpenGl_Context > OpenGl_Window::myGlContext [protected] |
Standard_Integer OpenGl_Window::myHeight [protected] |
Standard_Boolean OpenGl_Window::myOwnGContext [protected] |
Standard_Integer OpenGl_Window::myWidth [protected] |
1.7.4