| 575 | } |
| 576 | |
| 577 | void Renderer::NewFrame(ParamData *userParams) { |
| 578 | glClearColor(userParams->clear_color.x, userParams->clear_color.y, userParams->clear_color.z, |
| 579 | userParams->clear_color.w); |
| 580 | glfwPollEvents(); |
| 581 | // Clear the screen |
| 582 | glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT); |
| 583 | // Detect a click on the 3D Window by detecting a click that isn't on ImGui |
| 584 | userParams->window_active = userParams->window_active ? userParams->window_active : ( |
| 585 | (glfwGetMouseButton(window, GLFW_MOUSE_BUTTON_LEFT) == GLFW_PRESS) && (!ImGui::GetIO().WantCaptureMouse)); |
| 586 | if (!userParams->window_active) { |
| 587 | ImGui::GetIO().MouseDrawCursor = false; |
| 588 | } |
| 589 | ImGui_ImplOpenGL3_NewFrame(); |
| 590 | ImGui_ImplGlfw_NewFrame(); |
| 591 | ImGui::NewFrame(); |
| 592 | } |
| 593 | |
| 594 | void Renderer::DrawCarRaycasts() { |
| 595 | glm::vec3 carBodyPosition = car->car_body_model.position; |
nothing calls this directly
no outgoing calls
no test coverage detected