-
Notifications
You must be signed in to change notification settings - Fork 1
/
skybox.h
49 lines (41 loc) · 812 Bytes
/
skybox.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
#ifndef SKYBOX_H
#define SKYBOX_H
#include <stdlib.h>
#include <string>
#include <GL/glew.h>
#ifdef __APPLE__
#include <GLUT/glut.h>
#else
#include <GL/glut.h>
#endif
#include "glm/glm.hpp"
#include "glm/gtc/matrix_transform.hpp"
#include "glm/gtc/type_ptr.hpp"
#include "shader.h"
#include "sh_matrix.h"
#include "cubemap.h"
class Skybox
{
public:
Skybox (
const char* posx,
const char* posy,
const char* posz,
const char* negx,
const char* negy,
const char* negz,
float initScale);
virtual ~Skybox();
GLuint vao;
GLuint vbo;
GLuint tex_cube;
glm::mat4 viewMatrix;
glm::mat4 projectionMatrix;
float boxScale;
void render();
void updateView(glm::mat4 viewMatrix);
void updateProjection(glm::mat4 projectionMatrix);
GLuint progID;
};
extern Skybox theSkybox;
#endif