MCPcopy Create free account
hub / github.com/RenderKit/ospray / mainLoop

Method mainLoop

apps/ospExamples/GLFWOSPRayWindow.cpp:269–297  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

267}
268
269void GLFWOSPRayWindow::mainLoop()
270{
271 // continue until the user closes the window
272 startNewOSPRayFrame();
273
274 while (!glfwWindowShouldClose(glfwWindow) && !g_quitNextFrame) {
275 glfwPollEvents();
276
277 ImGui_ImplOpenGL3_NewFrame();
278 ImGui_ImplGlfw_NewFrame();
279 ImGui::NewFrame();
280
281 if (displayCallback)
282 displayCallback(this);
283
284 display();
285
286 if (showUi)
287 buildUI();
288
289 glDisable(GL_FRAMEBUFFER_SRGB); // Disable SRGB conversion for UI
290 ImGui::Render();
291 ImGui_ImplOpenGL3_RenderDrawData(ImGui::GetDrawData());
292
293 glfwSwapBuffers(glfwWindow);
294 }
295
296 waitOnOSPRayFrame();
297}
298
299void GLFWOSPRayWindow::reshape(const vec2i &newWindowSize)
300{

Callers 1

mainFunction · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected