[ADD] custom rendering system

This commit is contained in:
Menno
2021-05-18 11:20:57 +02:00
parent e46e26c729
commit 0bb4cc5e1d
29 changed files with 8840 additions and 805 deletions

32
src/entities/Camera.cpp Normal file
View File

@@ -0,0 +1,32 @@
#include "Camera.h"
namespace entities
{
Camera::Camera(const ::glm::vec3& position, const ::glm::vec3& rotation)
: position(position),
rotation(rotation)
{}
void Camera::move(GLFWwindow* window)
{
if (glfwGetKey(window, GLFW_KEY_W) == GLFW_PRESS)
{
position.z -= speed;
}
if (glfwGetKey(window, GLFW_KEY_S) == GLFW_PRESS)
{
position.z += speed;
}
if (glfwGetKey(window, GLFW_KEY_D) == GLFW_PRESS)
{
position.x += speed;
}
if (glfwGetKey(window, GLFW_KEY_A) == GLFW_PRESS)
{
position.x -= speed;
}
}
}