Skip to content

Commit 6b7e507

Browse files
committed
build: auto-detect ImGui GLSL version from active GL context
Pass nullptr to ImGui_ImplOpenGL3_Init() so ImGui queries the active context for the correct GLSL version, rather than hardcoding "#version 100" which is invalid on GLES3 contexts.
1 parent 398c398 commit 6b7e507

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

engine/render/r_main.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1086,7 +1086,7 @@ void r_renderer_c::Init(r_featureFlag_e features)
10861086
ImGui::SetCurrentContext(imguiCtx);
10871087

10881088
ImGui_ImplGlfw_InitForOpenGL((GLFWwindow*)sys->video->GetWindowHandle(), true);
1089-
ImGui_ImplOpenGL3_Init("#version 100");
1089+
ImGui_ImplOpenGL3_Init(nullptr);
10901090

10911091
fonts[F_FIXED] = new r_font_c(this, "Bitstream Vera Sans Mono");
10921092
fonts[F_VAR] = new r_font_c(this, "Liberation Sans");

0 commit comments

Comments
 (0)