#include <GLWinRenderArea.h>
Inheritance diagram for nvui::GLWinRenderArea:
Public Member Functions | |
NVSG_API | GLWinRenderArea (void) |
Default constructor. | |
virtual NVSG_API | ~GLWinRenderArea (void) |
Default destructor. | |
virtual NVSG_API bool | attachWindow (HWND hWnd) |
Attach a window to the render area. | |
virtual NVSG_API bool | init (RenderArea *shareArea=NULL) |
Create the render area. | |
virtual NVSG_API void | destroy (void) |
Destroy the render area. | |
NVSG_API void | makeCurrent (void) |
Make OpenGL context current. | |
virtual NVSG_API void | mouseButtonDown (UINT flags, int x, int y) |
Handle mouse button down. | |
virtual NVSG_API void | mouseButtonUp (UINT flags, int x, int y) |
Handle mouse button up. | |
virtual NVSG_API void | mouseMotion (int x, int y) |
Handle mouse motion. | |
virtual NVSG_API void | setViewportSize (size_t x, size_t y) |
Handle the viewport resizing. | |
NVSG_API bool | shareLists (GLWinRenderArea *ra) |
Share the OpenGL lists. | |
virtual NVSG_API void | renderScene (void) |
Trigger a redraw of the scene. | |
virtual NVSG_API void | triggerRedraw (void) |
Protected Member Functions | |
virtual NVSG_API bool | initGL (void) |
Initialize additional OpenGL features. | |
NVSG_API UINT | determinePixelFormat (void) |
Get the Pixelformat index. | |
Protected Attributes | |
HGLRC | m_hglrc |
Our OpenGL context. | |
HDC | m_hdc |
Our device context. |
This class is responsible for MS Windows specific OpenGL functionality. It sets up and destroys the OpenGL context, handles the creation, pixelformat, refresh, mouse input, etc.
|
Default constructor.
|
|
Default destructor.
|
|
Attach a window to the render area. You have to create an OpenGL capable window and attach it before calling init(), or you can derive from this class to integrate the functionality.
|
|
Create the render area. This method creates and initializes the render area.
Reimplemented from nvui::RenderArea. |
|
Destroy the render area. This method destroys and cleans up the render area. Reimplemented from nvui::RenderArea. |
|
Make OpenGL context current. This is a more clever way to make the context current. This method minimizes wglMakeCurrent calls.
|
|
Handle mouse button down. React on mouse button down events (for example, report it to the current camera manipulator).
Reimplemented from nvui::RenderArea. |
|
Handle mouse button up. React on mouse button up events (for example, report it to the current camera manipulator.
Reimplemented from nvui::RenderArea. |
|
Handle mouse motion. React on mouse motion events (for example, report it to the current camera manipulator.
Reimplemented from nvui::RenderArea. |
|
Handle the viewport resizing. Resize the viewport. React on parent window size changes. Report to OpenGL, to the render window, or to the camera manipulator.
Reimplemented from nvui::RenderArea. |
|
Share the OpenGL lists. Share display lists, textures, vertex programs, etc. with another rendering context.
|
|
Trigger a redraw of the scene. Do the rendering of the entire scene. (app, cull, draw the whole tree) If you want to trigger this method, use TriggerRedraw() to force a redraw of the scene. Reimplemented from nvui::RenderArea. |
|
Reimplemented from nvui::RenderArea. |
|
Initialize additional OpenGL features. This is a handy method that is called from create. Deriving from this class simplifies the initialization of special features like HW swap locking, etc.
|
|
Get the Pixelformat index. Determine the OpenGL pixelformat index with respect to the requested features, such as stereo, multisample, etc..
|
|
Our OpenGL context.
|
|
Our device context.
|