-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathGraphics.h
More file actions
94 lines (57 loc) · 1.39 KB
/
Graphics.h
File metadata and controls
94 lines (57 loc) · 1.39 KB
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
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
//
// Graphics.h
// VirtualMarbleGame
//
// Created by Maximilian Weber on 14/01/2012.
//
#ifndef VirtualMarbleGame_Graphics_h
#define VirtualMarbleGame_Graphics_h
#ifdef __linux
#include <GL/gl.h>
#include <GL/freeglut.h>
#else
#include <opengl/OpenGL.h>
#include <GLUT/glut.h>
#endif
#include "Board.h"
#include "Marble.h"
#include "VideoManager.h"
#include "Labyrinth.h"
class Board;
class Marble;
class Labyrinth;
class VideoManager;
class Pose;
class Graphics {
public:
Graphics(bool, Marble*, Labyrinth*, VideoManager*, Pose*, Pose*);
void display();
int init();
void resize( int, int);
void idle();
void setMarble(Marble*);
Marble* getMarble();
void switchCalibrate();
void switch90();
private:
bool rotate90;
Board* m_board;
Marble* m_marble;
Labyrinth* m_labyrinth;
VideoManager* m_videoManager;
Pose* m_pose;
Pose* m_gravity;
void drawVector();
void buildBlock( bool, bool, bool, bool, bool, bool );
GLuint LoadTGATexture( const char * filename);
void renderBoard();
void renderMarble();
void renderGravityVector();
GLuint block;
GLuint m_texture_labyrinth;
GLuint m_texture_marble;
double ry;
bool m_debug;
bool m_calibrate;
};
#endif