-
Notifications
You must be signed in to change notification settings - Fork 0
/
vrrendergoggles.h
44 lines (38 loc) · 1.03 KB
/
vrrendergoggles.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
44
#ifndef VRRENDERGOGGLES_H
#define VRRENDERGOGGLES_H
#include <QOpenGLShaderProgram>
#include <QOpenGLVertexArrayObject>
#include <QOpenGLFunctions>
#include "vrdistortionmesh.h"
#include "vrprojection.h"
/**
* @brief The VrRenderGoggles class helps you render given texture for your goggles
*/
class VrRenderGoggles: public QOpenGLFunctions
{
public:
VrRenderGoggles();
~VrRenderGoggles();
/**
* @brief render Render the given texture side by side for your goggles.
* @param texture
*/
void render(GLuint texture);
/**
* @brief updateProjection Update parameters of the projection.
* @param projection
*/
void updateProjection(const VrProjection *projection);
private:
bool init();
void createProjection(const VrProjection *config);
void createVAO();
QOpenGLShaderProgram program;
QOpenGLVertexArrayObject vao;
VrDistortionMesh mesh;
int u_texture;
int a_position, a_texture_coord;
bool inited;
static const char *fsh, *vsh;
};
#endif // VRRENDERGOGGLES_H