The SimpleTexturedRenderer class renders a SimpleTexturedScene.
More...
#include <simpletexturedrenderer.h>
|
void | objectAdded (const SimpleTexturedObject &obj) |
| This slot should be called whenever the underlying scene has a new object. More...
|
|
void | objectRemoved (const SimpleTexturedObject &obj) |
| This slot should be called whenever an object is removed from the underlying scene. Locks the mGLDataMutex. More...
|
|
void | clearAll () |
| Clears all OpenGL data, not assuming that a context is current. Some data may not be cleared immediately. Locks the mGLDataMutex. More...
|
|
void | cleanUp () override |
| Cleans up all OpenGL data. This assumes that the correct context is current, and all data is cleaned immediately. Locks the mGLDataMutex. More...
|
|
void | requestUpdate () |
| Calling this slot makes the renderer update itself when possible. More...
|
|
virtual void | cleanUp ()=0 |
| This slot should clean up all resources associated to the renderer. More...
|
|
|
| SimpleTexturedRenderer (SharedSimpleTexturedScene scene) |
|
virtual | ~SimpleTexturedRenderer () |
|
void | paint (QMatrix4x4 mvpMatrix, QVector3D camPos) override |
| Uses OpenGL commands to draw to the frame buffer. Nothing is assumed about the previous contents of the frame (i.e. glClear does not need to be called before this), and the OpenGL state should not change as a result of calling this function. More...
|
|
void | create () override |
| This is (should be) called on an OpenGL thread before this object is used. Allows the renderer to initialize its OpenGL-dependent objects. More...
|
|
virtual | ~AbstractRenderer () |
|
void | initializeGL () |
| Initializes OpenGL-related details. More...
|
|
|
void | initializeRenderer () override |
| Used to initialize renderer parameters that require an OpenGL context to be bound. More...
|
|
bool | checkGLErrors () |
| Helper method to loop glGetError() and print out all current errors. More...
|
|
◆ SimpleTexturedRenderer()
◆ ~SimpleTexturedRenderer()
SimpleTexturedRenderer::~SimpleTexturedRenderer |
( |
| ) |
|
|
virtual |
◆ cleanUp
void SimpleTexturedRenderer::cleanUp |
( |
| ) |
|
|
overrideslot |
Cleans up all OpenGL data. This assumes that the correct context is current, and all data is cleaned immediately. Locks the mGLDataMutex.
◆ clearAll
void SimpleTexturedRenderer::clearAll |
( |
| ) |
|
|
slot |
Clears all OpenGL data, not assuming that a context is current. Some data may not be cleared immediately. Locks the mGLDataMutex.
◆ create()
void SimpleTexturedRenderer::create |
( |
| ) |
|
|
overridevirtual |
This is (should be) called on an OpenGL thread before this object is used. Allows the renderer to initialize its OpenGL-dependent objects.
The difference between this and initializeGL() is that this should only include lightweight initialization.
Reimplemented from AbstractRenderer.
◆ initializeRenderer()
void SimpleTexturedRenderer::initializeRenderer |
( |
| ) |
|
|
overrideprotectedvirtual |
Used to initialize renderer parameters that require an OpenGL context to be bound.
Implements AbstractRenderer.
◆ objectAdded
This slot should be called whenever the underlying scene has a new object.
- Parameters
-
◆ objectRemoved
This slot should be called whenever an object is removed from the underlying scene. Locks the mGLDataMutex.
- Parameters
-
obj | The object that is already removed or will be removed. |
◆ paint()
void SimpleTexturedRenderer::paint |
( |
QMatrix4x4 |
mvpMatrix, |
|
|
QVector3D |
camPos |
|
) |
| |
|
overridevirtual |
Uses OpenGL commands to draw to the frame buffer. Nothing is assumed about the previous contents of the frame (i.e. glClear does not need to be called before this), and the OpenGL state should not change as a result of calling this function.
It is assumed that initializeGL() has been called for the current OpenGL context.
- Parameters
-
vpMatrix | The model-view-projection matrix that should be used. |
camPos | The world-space coordinates of the camera. |
Implements AbstractRenderer.
The documentation for this class was generated from the following files: