4#include <QOpenGLVertexArrayObject>
5#include <QtUiPlugin/QDesignerExportWidget>
30 void render(
const std::function<
void()>& cb);
Renders an OpenGL object (vertex-array) in a color and using a transformation/translation matrix.
Definition OpenGLRenderObject.h:17
QColor _color
Holds the color to render when the object has no color of itself.
Definition OpenGLRenderObject.h:74
QOpenGLVertexArrayObject * vertexArray()
Gets the assigned vertex array.
QOpenGLVertexArrayObject * _vertexArray
Holds the vertex array type derived object.
Definition OpenGLRenderObject.h:70
bool _enabled
Holds the flag weather it should be rendered or not.
Definition OpenGLRenderObject.h:76
OpenGLRenderObject(QObject *parent=nullptr)
Qt constructor.
void setEnabled(bool flag)
Sets the enable flag for this instance.
void render(const std::function< void()> &cb)
Render the object using a callback lambda function.
QMatrix4x4 & matrix()
Gets the reference to the matrix to be modified.
void setVertexArray(QOpenGLVertexArrayObject *)
Sets the assigned vertex array.
Q_SIGNAL void rendering()
Signal emitted just before the render() method is called.
QColor & color()
Gets the reference to the color to be modified.
QMatrix4x4 _matrix
Holds the matrix to transform and/or translate and defaults to a unit or identity matrix.
Definition OpenGLRenderObject.h:72
virtual bool isEnabled()
Gets the reference to the enable flag. Can be overridden to implement otherwise.
Definition Application.h:10