class ViewerUIFramework : public Viewer
A base class used for integrating CEETRON Envision with a UI Toolkit.
This class describes the minimum implementation needed to integrate CEETRON Envision into a UI framework. Ready to use PlatformIntegration classes are provided for Qt, wxWidgets and Win32. These can be useful to look at when creating a Viewer for your Toolkit. The Qt Viewers are described here: CEETRON Envision with Qt
To create your own Viewer, you need to derive from this class and implement the three pure virtual methods below. This is the only requirement to get CEETRON Envision to work with your UI toolkit.
doRequestRedraw(): Here you need to redraw the window, usually by posting an update/redraw/refresh message.
doRequestImmediateRedraw(): Here you need to redraw the window now, not just post an update/redraw/refresh message.
doMakeCurrent(): Here you need to make the OpenGL context current.
doIsCurrent(): Here you need to return true if the OpenGL context of this viewer is current, and false if not.
Please contact Support if you need assistance in using CEETRON Envision with your UI toolkit on your platform(s).
Constructs a Viewer.
You need to provide an OpenGLContextGroup. This is created using the VisualizationComponent::createOpenGLContextGroup() method. See one of the Minimal example programs for a demonstration on how to do this.
virtual void doRequestRedraw() = 0
Requests a redraw of the 3D window in the UI toolkit.
virtual void doRequestImmediateRedraw() = 0
Requests an immediate redraw of the 3D window in the UI toolkit.
virtual unsigned int doGetDefaultFramebufferObject() = 0
Returns the default framebuffer object for the current surface.
Does internal initialization of this viewer.
It is safe to call this function multiple times, successive calls will do nothing if the viewer is already initialized.
The OpenGL context associated with this viewer must be the current context before calling this function.
Prepares the viewer for deletion.
Prepares the viewer for deletion by shutting down and possibly cleaning up backing OpenGL structures and resources.
Since calling this function may trigger freeing of OpenGL resources, the OpenGL context associated with this viewer must be current when calling this function.
After calling this function the viewer is no longer usable and should be deleted.
OpenGLInfo openGLInfo() const
Returns the openGL info for current framework.