-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathWindow.h
94 lines (75 loc) · 2.26 KB
/
Window.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
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
//
// Window.h
// CSE167-Final
//
// Created by Aaron Wong on 11/26/16.
// Copyright © 2016 wongsauce. All rights reserved.
//
#ifndef _WINDOW_H_
#define _WINDOW_H_
#include <iostream>
#define GLFW_INCLUDE_GLEXT
#ifdef __APPLE__
#define GLFW_INCLUDE_GLCOREARB
#else
#include <GL/glew.h>
#include <OpenGL/glext.h>
#endif
#include <glm/mat4x4.hpp>
#include <glm/gtc/matrix_transform.hpp>
#include <GLFW/glfw3.h>
#include <stdlib.h>
#include <stdio.h>
#include <math.h>
#include <iostream>
#include <time.h>
#include "glm/gtc/matrix_access.hpp"
#include "glm/ext.hpp"
#include "shader.h"
#include "TextureHandler.h"
#include "Terrain.h"
#include "SkyBox.h"
#include "OBJObject.h"
#include "Node.h"
#include "Group.h"
#include "Geode.h"
#include "Cube.h"
#include "MatrixTransform.h"
#include "Water.h"
#include "FBO.h"
#include "ParticleGen.h"
#include "FullscreenQuad.h"
#include <irrKlang.h>
using namespace irrklang;
#pragma comment(lib, "irrKlang.lib") // link with irrKlang.dll
class Window
{
public:
static double mouseX, mouseY;
static double currentScrollOffset;
static int width, height;
static int parts_drawn;
static glm::mat4 P, V; // Projection and View
static void initialize_objects();
static void clean_up();
static GLFWwindow* create_window(int width, int height);
static void resize_callback(GLFWwindow*, int width, int height);
static void idle_callback(GLFWwindow*);
static void display_callback(GLFWwindow*);
static void key_callback(GLFWwindow* window, int key, int scancode, int action, int mods);
static void mouse_button_callback(GLFWwindow* window, int key, int action, int mods);
static void cursor_position_callback(GLFWwindow* window, double xpos, double ypos);
static void scroll_callback(GLFWwindow* window, double xoffset, double yoffset);
static glm::vec3 trackballMapping(double xpos, double ypos, int width, int height);
static void point_callback(GLFWwindow* window);
static void mouse_move_callback(GLFWwindow*, double, double);
static void drawSkybox();
static void drawObjects();
static void drawReflection();
static void drawRefraction();
static void drawAll();
static void drawWater();
static void invertPitch();
static void drawScene();
};
#endif