Force GLSL version 140 for macOS

This commit is contained in:
Evie Viau-Chow-Stuart 2023-06-21 14:08:15 -04:00
parent a3ee10d43e
commit 47f515a86b
Signed by: evie
GPG key ID: 928652CDFCEC8099
4 changed files with 14 additions and 7 deletions

View file

@ -17,5 +17,3 @@ publish-maven:
stage: publish
script:
- 'gradle publish'
rules:
- if: $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH

View file

@ -3,7 +3,7 @@ org.gradle.jvmargs = -Xmx1G
org.gradle.parallel = true
# Mod Properties
version = 1.0.2+1.20
version = 1.0.4-DEV+1.20
maven_group = gay.eviee
archives_base_name = imguiquilt

View file

@ -8,6 +8,8 @@ import imgui.flag.ImGuiConfigFlags;
import imgui.gl3.ImGuiImplGl3;
import imgui.glfw.ImGuiImplGlfw;
import java.util.Locale;
import static org.lwjgl.glfw.GLFW.*;
public class ImguiLoader {
@ -20,7 +22,14 @@ public class ImguiLoader {
public static void onGlfwInit(long handle) {
initializeImGui(handle);
imGuiGlfw.init(handle,true);
imGuiGl3.init();
if (System.getProperty("os.name").toLowerCase(Locale.getDefault()).contains("mac")) {
// force it to use opengl 3.1 instead of 3.0 because Apple
imGuiGl3.init("#version 140");
} else {
imGuiGl3.init("#version 130");
}
windowHandle = handle;
}

View file

@ -12,9 +12,9 @@
},
"license": "Apache-2.0",
"contact": {
"homepage": "https://sr.ht/~eviee/imgui-quilt/",
"issues": "https://todo.sr.ht/~eviee/imgui-quilt",
"sources": "https://git.sr.ht/~eviee/imgui-quilt"
"homepage": "https://git.gaycatgirl.sex/evie/imgui-quilt",
"issues": "https://git.gaycatgirl.sex/evie/imgui-quilt/-/issues",
"sources": "https://git.gaycatgirl.sex/evie/imgui-quilt"
},
"icon": "assets/imguiquilt/icon.png"
},