-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathViewerBasic.h
64 lines (44 loc) · 1.08 KB
/
ViewerBasic.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
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
#ifndef VIEWERBASIC_H
#define VIEWERBASIC_H
#include "glcore.h"
#include "window.h"
#include "program.h"
#include "texture.h"
#include "mesh.h"
#include "draw.h"
#include "vec.h"
#include "mat.h"
#include "orbiter.h"
#include "app.h"
class ViewerBasic : public App
{
public:
ViewerBasic();
//! Initialise tout : compile les shaders et construit le programme + les buffers + le vertex array. renvoie -1 en cas d'erreur.
int init();
//! La fonction d'affichage
int render();
void help();
int quit() { return 1; }
protected:
Orbiter m_camera;
DrawParam gl;
bool mb_cullface;
bool mb_wireframe;
Mesh m_axe;
Mesh m_grid;
Mesh m_cube;
bool b_draw_grid;
bool b_draw_axe;
void init_axe();
void init_grid();
void init_cube();
Mesh m_quad;
void init_quad();
void draw_axe(const Transform& T);
void draw_grid(const Transform& T);
void draw_cube(const Transform& T);
void draw_quad(const Transform& T);
void manageCameraLight();
};
#endif