#include <GOpenGLFrame.h>
Inheritance diagram for GCE::GOpenGLFrame:


Public Slots | |
| virtual void | startRendering (int sleep_ms_between_updates_min=20) |
| virtual void | setTimeBetweenRendering (int milliseconds) |
| virtual void | stopRendering () |
| virtual void | initializeGL () |
| Initialize some OpenGL things, this only needs to be called once. | |
| virtual void | resizeGL (int w, int h) |
| Set the screen size. | |
| virtual void | paintGL () |
| Do the actual rendering. | |
Signals | |
| void | beforeRendering () |
| void | afterRendering () |
Public Member Functions | |
| GOpenGLFrame (const GWE::GInformationInterface *WorldData, GScene *scene, QWidget *parent=0) | |
| Constructor. | |
| ~GOpenGLFrame () | |
| Destructor. | |
| GScene * | getScene () |
Public Attributes | |
| GViewProperties | ViewProperties |
Protected Attributes | |
| QTimer | RedrawTimer |
| bool | StopRendering |
| int | RedrawSleepTime_ms |
Private Attributes | |
| const GWE::GInformationInterface * | WorldData |
| GScene * | Scene |
| GCS::GElementID | CameraParent |
| QList< double > | RenderingPeriods |
| double | FramesPerSecond |
| double | TimeSinceFpsUpdate |
| QTime | FpsTimer |
| void GCE::GOpenGLFrame::afterRendering | ( | ) | [signal] |
Emitted after rendering, all content is rendered.
| void GCE::GOpenGLFrame::beforeRendering | ( | ) | [signal] |
Emitted just before starting the rendering cycle, no transformation,... done before emitting this signal.
| void GCE::GOpenGLFrame::paintGL | ( | ) | [virtual, slot] |
| void GCE::GOpenGLFrame::setTimeBetweenRendering | ( | int | milliseconds | ) | [virtual, slot] |
This allows to change the desired FPS after rendering has already been enabled.
| void GCE::GOpenGLFrame::startRendering | ( | int | sleep_ms_between_updates_min = 20 |
) | [virtual, slot] |
starts a thread that constantly sends paint events to this OpenGL frame to ensure repainting; a value of 20 means a framerate of 50 fps under optimum conditions;
| void GCE::GOpenGLFrame::stopRendering | ( | ) | [virtual, slot] |
Stops rendering. Sets StopRendering to true.
Used to know for which elements the respective server name should be shown. It's determined at the beginning of each render cycle and stored here.
QTime GCE::GOpenGLFrame::FpsTimer [private] |
Used to measure rendering periods.
double GCE::GOpenGLFrame::FramesPerSecond [private] |
The calculated fps value.
int GCE::GOpenGLFrame::RedrawSleepTime_ms [protected] |
How many milliseconds to wait after finishing drawing before redrawing.
QTimer GCE::GOpenGLFrame::RedrawTimer [protected] |
Started as singleshot timer after each redraw, connected to update()
QList<double> GCE::GOpenGLFrame::RenderingPeriods [private] |
Stores the time for the last rendering periods. This is used for frames per second calculations. On each FPS update the list is cleared.
GScene* GCE::GOpenGLFrame::Scene [private] |
The actual scene that is rendered.
bool GCE::GOpenGLFrame::StopRendering [protected] |
When this is set to true, rendering is halted. After that you have to call startRendering() to restart rendering.
double GCE::GOpenGLFrame::TimeSinceFpsUpdate [private] |
Time since last fps update. This is summed up in each rendering cycle, if it reaches 1 second, the FPS value is updated. The unit is milliseconds.
The view properties. Basically these are the camera settings.
const GWE::GInformationInterface* GCE::GOpenGLFrame::WorldData [private] |
Used for getting information about elements.
1.4.7