-
Notifications
You must be signed in to change notification settings - Fork 1
/
Ocean.h
55 lines (46 loc) · 945 Bytes
/
Ocean.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
#ifndef OCEAN_H
#define OCEAN_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 Ocean
{
public:
Ocean (const char* posx,
const char* posy,
const char* posz,
const char* negx,
const char* negy,
const char* negz,
float pposx,
float ppoxy,
float pposz,
float initScale);
virtual ~Ocean();
GLuint vao;
GLuint vbo;
GLuint tex_cube;
glm::mat4 viewMatrix;
glm::mat4 projectionMatrix;
glm::vec3 cameraPosition;
float timer;
float boxScale;
void render();
void updateView(glm::mat4 viewMatrix);
void updateProjection(glm::mat4 projectionMatrix);
void updatePosition(glm::vec3 cameraPosition);
GLuint progID;
};
extern Ocean theOcean;
#endif