deferred rendering can be enabled for certain meshes

This commit is contained in:
2023-01-13 17:55:45 +01:00
parent 13f67a7cdb
commit 79b68fbff1
6 changed files with 36 additions and 33 deletions

View File

@ -81,14 +81,12 @@ public:
const float sensitivity = 0.1;
static bool firstMouse = true;
if (MouseButtonPressed(YOGGIE_MOUSE_BUTTON_MIDDLE) ){
if (MouseButtonPressed(YOGGIE_MOUSE_BUTTON_RIGHT) ){
glfwSetInputMode(AppWindow.GetGLFWHandle(), GLFW_CURSOR, GLFW_CURSOR_HIDDEN);
auto newX = getCursorPosX(&AppWindow);
auto newY = getCursorPosY(&AppWindow);
if (firstMouse)
{
lastX = newX;
@ -115,31 +113,25 @@ public:
cam.pitch = -89.0f;
}
// Check for Camara movement input here!
if (keyIsPressed(YOGGIE_KEY_W)) {
cam.Position += cam.Front * movement_speed;
else if (firstMouse == false)
{
glfwSetInputMode(AppWindow.GetGLFWHandle(), GLFW_CURSOR, GLFW_CURSOR_NORMAL);
firstMouse = true;
}
// Check for Camara movement input here!
if (keyIsPressed(YOGGIE_KEY_W))
cam.Position += cam.Front * movement_speed;
if (keyIsPressed(YOGGIE_KEY_A))
{
cam.Position -= cam.Right * movement_speed;
}
if (keyIsPressed(YOGGIE_KEY_S)) {
if (keyIsPressed(YOGGIE_KEY_S))
cam.Position -= cam.Front * movement_speed;
}
if (keyIsPressed(YOGGIE_KEY_D)) {
if (keyIsPressed(YOGGIE_KEY_D))
cam.Position += cam.Right * movement_speed;
}
}
}