-
Notifications
You must be signed in to change notification settings - Fork 0
/
vrrenderfullscreen.h
43 lines (36 loc) · 946 Bytes
/
vrrenderfullscreen.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
#ifndef VRRENDERFULLSCREEN_H
#define VRRENDERFULLSCREEN_H
#include <QOpenGLShaderProgram>
#include <QOpenGLVertexArrayObject>
#include <QOpenGLBuffer>
#include <QOpenGLFunctions>
#include "vrprojection.h"
/**
* @brief The VrRenderFullscreen class helps you render given texture all over you screen.
*/
class VrRenderFullscreen: public QOpenGLFunctions
{
public:
VrRenderFullscreen();
~VrRenderFullscreen();
/**
* @brief render Render the texture on the screen.
* @param texture
*/
void render(GLuint texture);
/**
* @brief updateProjection Update rendering paramerers
*/
void updateProjection(const VrProjection *);
private:
bool init();
void createVAO();
QOpenGLShaderProgram program;
QOpenGLBuffer canvas_buffer;
QOpenGLVertexArrayObject vao;
int a_coord;
int u_tex_color;
bool inited;
static const char *vsh, *fsh;
};
#endif // VRRENDERFULLSCREEN_H