deferred rendering can be enabled for certain meshes
This commit is contained in:
		| @ -82,6 +82,8 @@ public: | ||||
|             auto& render3d = selected.GetComponent<Render3DComponent>(); | ||||
|             if (ImGui::CollapsingHeader("Render3D", ImGuiTreeNodeFlags_DefaultOpen)) { | ||||
|                 ImGui::ColorEdit3("Colour", glm::value_ptr(render3d.color)); | ||||
|  | ||||
|                 ImGui::Checkbox("Use static rendering:", &render3d.isStatic); | ||||
|             } | ||||
|         } | ||||
|         static bool deferred = true; | ||||
|  | ||||
| @ -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; | ||||
|  | ||||
|                 } | ||||
|  | ||||
|  | ||||
|  | ||||
|             } | ||||
|  | ||||
|         } | ||||
|  | ||||
		Reference in New Issue
	
	Block a user