From 5b7f71f8ea334d3362adbde5023f7d043f8cc67d Mon Sep 17 00:00:00 2001 From: nopjmp Date: Wed, 24 Feb 2021 20:29:14 -0600 Subject: [PATCH] [fix] force initialize our gLSL shaders as version 110 --- .../kotlin/me/zeroeightsix/kami/gui/KamiImgui.kt | 15 ++------------- 1 file changed, 2 insertions(+), 13 deletions(-) diff --git a/src/main/kotlin/me/zeroeightsix/kami/gui/KamiImgui.kt b/src/main/kotlin/me/zeroeightsix/kami/gui/KamiImgui.kt index a2454685b..a9a63a7da 100644 --- a/src/main/kotlin/me/zeroeightsix/kami/gui/KamiImgui.kt +++ b/src/main/kotlin/me/zeroeightsix/kami/gui/KamiImgui.kt @@ -92,22 +92,11 @@ object KamiImgui { val defaultFontName = fontNames.getOrElse(Settings.font) { fontNames.first() } ImGui.getIO().setFontDefault(fonts[defaultFontName]) - val caps = GL.getCapabilities() - // TODO: check if this works on macOS properly. - val glslVersion = when { - caps.OpenGL32 -> { - 150 - } - caps.OpenGL30 -> { // apparently we might have to skip this one? - 130 - } - else -> 110 - } - ImGui.getIO().addConfigFlags(ImGuiConfigFlags.DockingEnable) imguiGlfw.init(mc.window.handle, false) - imguiGl.init("#version $glslVersion") + // Force 110 shaders since this is what base Minecraft uses to avoid bugs in Intel drivers. + imguiGl.init("#version 110") } internal fun frame(matrices: MatrixStack, block: () -> Unit) {