MCPcopy Create free account
hub / github.com/MeshInspector/MeshLib / initBackend

Method initBackend

source/MRViewer/ImGuiMenu.cpp:203–222  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

201}
202
203void ImGuiMenu::initBackend()
204{
205 if ( !viewer || !viewer->isGLInitialized() )
206 return;
207
208#ifdef __EMSCRIPTEN__
209 const char* glsl_version = "#version 300 es";
210#else
211 const char* glsl_version = "#version 150";
212#endif
213 rescaleStyle_();
214 ImGui_ImplGlfw_InitForOpenGL( viewer->window, false );
215 ImGui_ImplOpenGL3_Init( glsl_version );
216
217 // init emscripten resize, fullscreen, mouse scroll callback
218 // may duplicate an existing resize callback (resizeEmsCanvas in MRViewer.cpp)
219#ifdef __EMSCRIPTEN__
220 ImGui_ImplGlfw_InstallEmscriptenCallbacks( viewer->window, "#canvas" );
221#endif
222}
223
224void reserveKeyEvent( ImGuiKey key )
225{

Callers 1

launchInit_Method · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected