mirror of
https://github.com/TheRedShip/RT_GPU.git
synced 2025-09-27 18:48:36 +02:00
+ | Basic camera but glitched for now
This commit is contained in:
@ -23,10 +23,13 @@ class Camera
|
||||
~Camera(void);
|
||||
|
||||
void update_camera_vectors();
|
||||
|
||||
glm::mat4 get_view_matrix();
|
||||
glm::vec3 get_position();
|
||||
|
||||
void process_movement(float xoffset, float yoffset, bool constrainPitch);
|
||||
|
||||
void process_mouse(float xoffset, float yoffset, bool constrainPitch);
|
||||
void process_keyboard(bool forward, bool backward, bool left, bool right, bool up, bool down);
|
||||
|
||||
private:
|
||||
|
||||
glm::vec3 _position;
|
||||
|
@ -18,6 +18,8 @@
|
||||
|
||||
# include "glm/glm.hpp"
|
||||
# include "glm/gtc/matrix_transform.hpp"
|
||||
# include "glm/gtc/type_ptr.hpp"
|
||||
|
||||
# include "glad/gl.h"
|
||||
# include "GLFW/glfw3.h"
|
||||
|
||||
|
@ -34,10 +34,10 @@ class Shader
|
||||
// void setBool(const std::string &name, bool value) const;
|
||||
// void setInt(const std::string &name, int value) const;
|
||||
// void setFloat(const std::string &name, float value) const;
|
||||
void setVec2f(const std::string &name, const glm::vec2 &value) const;
|
||||
// void setVec3(const std::string &name, const RT::Vec3f &value) const;
|
||||
void set_vec2(const std::string &name, const glm::vec2 &value) const;
|
||||
void set_vec3(const std::string &name, const glm::vec3 &value) const;
|
||||
// void setVec4(const std::string &name, const RT::Vec4f &value) const;
|
||||
// void setMat4(const std::string &name, const RT::Mat4f &value) const;
|
||||
void set_mat4(const std::string &name, const glm::mat4 &value) const;
|
||||
|
||||
GLuint getProgram(void) const;
|
||||
|
||||
|
@ -24,6 +24,7 @@ class Window
|
||||
~Window(void);
|
||||
|
||||
GLFWwindow *getWindow(void) const;
|
||||
Camera *get_camera(void) const;
|
||||
float getFps(void) const;
|
||||
|
||||
void display();
|
||||
@ -36,7 +37,7 @@ class Window
|
||||
|
||||
private:
|
||||
GLFWwindow *_window;
|
||||
Camera *camera;
|
||||
Camera *_camera;
|
||||
|
||||
float _fps;
|
||||
|
||||
|
Reference in New Issue
Block a user