ProjectedTextures
Prototype software for spacial augmented reality applications.
 All Classes Namespaces Files Functions Variables Enumerations Enumerator Macros
ViewportSquare.h
Go to the documentation of this file.
1 #pragma once
2 
3 #include <QVector>
4 #include <QMatrix4x4>
5 #include <QOpenGLFunctions>
6 #include <QOpenGLVertexArrayObject>
7 #include <QOpenGLBuffer>
8 #include <QOpenGLShaderProgram>
9 #include "RenderEnums.h"
10 
19  protected QOpenGLFunctions
20 {
21 public:
23  ~ViewportSquare(void);
24 
25  void draw(QOpenGLShaderProgram* prog);
28 protected:
29  bool valid;
30  QVector<QVector3D> positions;
31  QVector<GLuint> indices;
32 
33  QOpenGLVertexArrayObject vao;
34  QOpenGLBuffer positionBuffer;
35  QOpenGLBuffer indexBuffer;
36 
37  void createBuffers();
38 };