MCPcopy Create free account
hub / github.com/RenderKit/embree / renderInteractive

Method renderInteractive

tutorials/common/tutorial/tutorial.cpp:996–1037  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

994 }
995
996 void TutorialApplication::renderInteractive()
997 {
998 window_width = width;
999 window_height = height;
1000 glfwSetErrorCallback(errorFunc);
1001 glfwInit();
1002 glfwWindowHint(GLFW_CONTEXT_VERSION_MAJOR,2);
1003 glfwWindowHint(GLFW_CONTEXT_VERSION_MINOR,0);
1004
1005 if (fullscreen) window = createFullScreenWindow();
1006 else window = createStandardWindow(width,height);
1007
1008 glfwMakeContextCurrent(window);
1009 glfwSwapInterval(0);
1010 reshapeFunc(window,0,0);
1011
1012 ImGui::CreateContext();
1013 ImGuiIO& io = ImGui::GetIO(); (void)io;
1014
1015 ImGui_ImplGlfw_InitForOpenGL(window, true);
1016 ImGui_ImplOpenGL2_Init();
1017
1018 setCallbackFunctions(window);
1019
1020 // Setup style
1021 ImGui::StyleColorsDark();
1022
1023 while (!glfwWindowShouldClose(window))
1024 {
1025 glfwPollEvents();
1026
1027 displayFunc();
1028 }
1029
1030 // Cleanup
1031 ImGui_ImplOpenGL2_Shutdown();
1032 ImGui_ImplGlfw_Shutdown();
1033 ImGui::DestroyContext();
1034
1035 glfwDestroyWindow(window);
1036 glfwTerminate();
1037 }
1038
1039#endif
1040

Callers

nothing calls this directly

Calls 6

reshapeFuncFunction · 0.85
ImGui_ImplOpenGL2_InitFunction · 0.85
displayFuncFunction · 0.85
ImGui_ImplGlfw_ShutdownFunction · 0.85

Tested by

no test coverage detected