Walls And Holes  1
drawableaxes.h
Go to the documentation of this file.
1 #ifndef DRAWABLEAXES_H
2 #define DRAWABLEAXES_H
3 
4 #include <QOpenGLFunctions>
5 #include <QOpenGLShaderProgram>
6 #include <QOpenGLVertexArrayObject>
7 #include <QOpenGLBuffer>
8 
10 
17 class DrawableAxes : public AbstractDrawableGLObject, public QOpenGLFunctions {
18 public:
19  DrawableAxes();
20 
21  void initializeGL() override;
22  void draw(QMatrix4x4 projection, QMatrix4x4 transformation) override;
23 
24 protected:
25 
26  QSharedPointer<QOpenGLVertexArrayObject> mVAO;
27  QSharedPointer<QOpenGLBuffer> mPos;
28  QSharedPointer<QOpenGLBuffer> mColor;
29 
30  QSharedPointer<QOpenGLShaderProgram> mProgram;
31 };
32 
33 #endif // DRAWABLEAXES_H
void draw(QMatrix4x4 projection, QMatrix4x4 transformation) override
Performs OpenGL calls to draw the object, assuming a context is bound.
Definition: drawableaxes.cpp:68
QSharedPointer< QOpenGLVertexArrayObject > mVAO
Definition: drawableaxes.h:26
QSharedPointer< QOpenGLBuffer > mPos
Definition: drawableaxes.h:27
QSharedPointer< QOpenGLBuffer > mColor
Definition: drawableaxes.h:28
Abstract class for objects with special OpenGL rendering.
Definition: abstractdrawableglobject.h:13
void initializeGL() override
Called when this object is to be used with a new OpenGL context. Must be called before the first draw...
Definition: drawableaxes.cpp:11
QSharedPointer< QOpenGLShaderProgram > mProgram
Definition: drawableaxes.h:30
An object that may be added to a Scene to display the XYZ axes.
Definition: drawableaxes.h:17
DrawableAxes()
Definition: drawableaxes.cpp:6