-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathapplication.h
More file actions
69 lines (54 loc) · 1.69 KB
/
application.h
File metadata and controls
69 lines (54 loc) · 1.69 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
#ifndef __application_h_
#define __application_h_
#ifdef __APPLE__
#include <OpenGL/gl3.h>
#define __gl_h_
#else
#include <GL/glew.h>
#endif
#include <GLFW/glfw3.h>
#include "program.h"
#include "scene.h"
#include "camera.h"
#include "game.h"
class Application
{
public:
static void start();
private:
static void display();
static void initOpenGL();
static void initGame();
static void setTitleFps();
static void error_callback(int error, const char* description);
static void key_callback(GLFWwindow* window, int key, int scancode, int action, int mods);
static void window_size_callback(GLFWwindow *window, int width, int height);
static void mousepos_callback(GLFWwindow* window, double mouseX, double mouseY);
static void mouse_button_callback(GLFWwindow* window, int button, int action, int mods);
static double lastTime;
static int nbFrames;
static int nbFramesLastSecond;
static GLFWwindow *window;
static Program program;
static Program program_shadows;
static Program program_selection;
static Program program_skybox;
static Scene scene;
static Camera *camera;
static Game game;
static void renderShadow(int);
static void renderScene();
static int window_width, window_height;
static int framebuffer_width, framebuffer_height;
// Pour la camera
static int midWindowX, midWindowY;
// Selection
static void processSelection(int, int);
static void renderSelection();
//Skybox
static void renderSkybox();
static void saveTexture();
static bool skybox_enabled_demo, shadow_enabled_demo, reflection_enabled_demo;
static bool light_enabled_demo[2];
};
#endif