MCPcopy Create free account
hub / github.com/OpenNFS/OpenNFS / NewFrame

Method NewFrame

src/Renderer/Renderer.cpp:577–592  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

575}
576
577void 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
594void Renderer::DrawCarRaycasts() {
595 glm::vec3 carBodyPosition = car->car_body_model.position;

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected