-
Notifications
You must be signed in to change notification settings - Fork 2
/
Engine.h
63 lines (46 loc) · 1.09 KB
/
Engine.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
/*
* File: Engine.h
* Author: dude719
*
* Created on April 19, 2015, 6:10 AM
*/
#ifndef ENGINE_H
#define ENGINE_H
#include <iostream>
#include <fstream>
#include <string>
#include <vector>
#include <sstream>
// My Classes
#include "Bsp.h"
#include "Camera.h"
#include "SharedDefs.h"
// OpenGL
#include "GLFW/glfw3.h"
#include "GLEW/glew.h"
#include "glm/glm.hpp"
#include "glm/gtc/matrix_transform.hpp"
#include "glm/gtc/type_ptr.hpp"
class Engine
{
public:
Engine(int width, int height, const char* title);
void OpenWindow(const char* title);
void Update();
GLFWwindow* Window();
Camera* Cam();
void OffsetScroll(double deltaY);
int GetFPS();
bool IsButtonPressed(int code);
private:
Camera* camera;
GLFWwindow* window;
glm::vec2 mouseDelta;
double mouseX, mouseY, lastX, lastY;
float mouseSpeed, cameraSpeed, maxCameraSpeed, zoomSpeed;
float scrollY;
float lastTime, deltaTime, currentTime;
int frameCount, fps;
};
extern Engine* g_pEngine;
#endif /* ENGINE_H */