~ | Cross platform makefiles

This commit is contained in:
RedShip
2024-12-23 18:19:41 +01:00
parent 4d1d47a46a
commit ffc26d6078
6 changed files with 155 additions and 63 deletions

View File

@ -3,17 +3,17 @@
/* ::: :::::::: */
/* Camera.cpp :+: :+: :+: */
/* +:+ +:+ +:+ */
/* By: TheRed <TheRed@students.42.fr> +#+ +:+ +#+ */
/* By: ycontre <ycontre@student.42.fr> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2024/10/15 14:00:38 by TheRed #+# #+# */
/* Updated: 2024/10/15 14:00:38 by TheRed ### ########.fr */
/* Updated: 2024/12/23 17:42:20 by ycontre ### ########.fr */
/* */
/* ************************************************************************** */
#include "Camera.hpp"
Camera::Camera(glm::vec3 start_pos, glm::vec3 start_up, float start_yaw, float start_pitch)
: _forward(glm::vec3(0.0f, 0.0f, -1.0f)), _yaw(start_yaw), _pitch(start_pitch), _position(start_pos), _up(start_up)
: _forward(glm::vec3(0.0f, 0.0f, -1.0f)), _position(start_pos), _up(start_up), _pitch(start_pitch), _yaw(start_yaw)
{
update_camera_vectors();
}

View File

@ -6,7 +6,7 @@
/* By: ycontre <ycontre@student.42.fr> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2024/10/13 16:16:24 by TheRed #+# #+# */
/* Updated: 2024/10/13 20:52:00 by ycontre ### ########.fr */
/* Updated: 2024/12/23 17:39:55 by ycontre ### ########.fr */
/* */
/* ************************************************************************** */
@ -56,7 +56,7 @@ Window::~Window(void)
void Window::keyCallback(GLFWwindow* window, int key, int scancode, int action, int mods)
{
Window* win = static_cast<Window*>(glfwGetWindowUserPointer(window));
(void) win; (void) key; (void) scancode; (void) mods;
(void) win; (void) key; (void) scancode; (void) mods; (void) action;
bool forward = glfwGetKey(window, GLFW_KEY_W) == GLFW_PRESS;
bool backward = glfwGetKey(window, GLFW_KEY_S) == GLFW_PRESS;