43 lines
695 B
C++
43 lines
695 B
C++
#ifndef SCENE_H_
|
|
#define SCENE_H_
|
|
|
|
#include <GLFW/glfw3.h>
|
|
#include <glm/glm.hpp>
|
|
|
|
#include "fbo.h"
|
|
|
|
class Scene {
|
|
public:
|
|
Scene(int width, int height);
|
|
~Scene();
|
|
|
|
void Init();
|
|
void Display(GLFWwindow* window);
|
|
void DrawGui(GLFWwindow* window);
|
|
void Idle();
|
|
void ReloadShader();
|
|
|
|
int window_width;
|
|
int window_height;
|
|
|
|
private:
|
|
void InitBuffers();
|
|
void InitShaders();
|
|
|
|
FBO fbo_;
|
|
GLuint shader_program_;
|
|
GLuint vao_;
|
|
float angle_;
|
|
float scale_;
|
|
float aspect_;
|
|
float near_z_;
|
|
float far_z_;
|
|
float fov_;
|
|
|
|
glm::mat4 view_matrix_;
|
|
glm::mat4 projection_matrix_;
|
|
|
|
void UpdateCamera();
|
|
};
|
|
|
|
#endif // SCENE_H_
|