#include <glwidget.h>
Signals | |
void | render (void) |
Periodic render event. | |
Public Member Functions | |
CGLWidget (const QGLFormat &format, ICameraState *cs) | |
Constructs a GL widget. | |
virtual | ~CGLWidget (void) |
Destructor. | |
bool | isSuccessfullyInitialized (void) const |
Check, wether the OpenGL context is active. | |
QString | getDriverInfoString (void) const |
Returns a driver info string containing. |
This widget is used to create and manage an OpenGL 2.0 context. It is also responsible for capturing mouse and keyboard events and for their processing. It interacts with a ICameraState object by manipulating it's rotation and translation properties. The widget must be shown to initialize the renderng context.
The widet emits render() events in a regular time interval.
CGLWidget::CGLWidget | ( | const QGLFormat & | format, | |
ICameraState * | cs | |||
) |
Constructs a GL widget.
format | Pixel format for the OpenGL context. | |
cs | ICameraState object to manipulate. |
bool CGLWidget::isSuccessfullyInitialized | ( | void | ) | const [inline] |
Check, wether the OpenGL context is active.
If the widget owns a valid OpenGL 2.0 rendering context, this method returns True. Otherwise it returns False.
QString CGLWidget::getDriverInfoString | ( | void | ) | const |
Returns a driver info string containing.
The string is intended to be displayed to the user. The OpenGL context must be initialized to use this call.
void CGLWidget::render | ( | void | ) | [signal] |
Periodic render event.
The user of this widget can be notified, that it is time to redraw it's scene. When this signal is processed, the GL widget has already set the current viewport parameters, so yout can access them with glGetFloatv( GL_VIEWPORT, ... ).