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

Method mainLoop

modules/mpi/tutorials/GLFWDistribOSPRayWindow.cpp:203–231  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

201}
202
203void GLFWDistribOSPRayWindow::mainLoop()
204{
205 while (true) {
206 MPI_Bcast(&windowState, sizeof(WindowState), MPI_BYTE, 0, MPI_COMM_WORLD);
207 if (windowState.quit) {
208 break;
209 }
210
211 // TODO: Actually render asynchronously, if we have MPI thread multiple
212 // support
213 startNewOSPRayFrame();
214 waitOnOSPRayFrame();
215
216 if (mpiRank == 0) {
217 glfwPollEvents();
218
219 ImGui_ImplOpenGL3_NewFrame();
220 ImGui_ImplGlfw_NewFrame();
221 ImGui::NewFrame();
222
223 if (displayCallback)
224 displayCallback(this);
225
226 display();
227
228 windowState.quit = glfwWindowShouldClose(glfwWindow) || g_quitNextFrame;
229 }
230 }
231}
232
233void GLFWDistribOSPRayWindow::reshape(const vec2i &newWindowSize)
234{

Callers 5

mainFunction · 0.45
mainFunction · 0.45
mainFunction · 0.45
mainFunction · 0.45
mainFunction · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected