Browse Source

Fixes #265 Enforce the OpenGL 3.2 Core Profile on Mac OS X

MeFisto94 5 years ago
parent
commit
f55bbc1c43
1 changed files with 5 additions and 0 deletions
  1. 5 0
      jme3-core/src/com/jme3/gde/core/editor/SceneApplication.java

+ 5 - 0
jme3-core/src/com/jme3/gde/core/editor/SceneApplication.java

@@ -24,6 +24,10 @@ public class SceneApplication extends SimpleApplication {
         super(new StatsAppState());
         AppSettings newSetting = new AppSettings(true);
         newSetting.setFrameRate(30);
+        if (System.getProperty("os.name").toLowerCase().contains("mac")) {
+            // On Mac we need to enforce the 3.2 core profile or we have 2.0 only
+            newSetting.setRenderer(AppSettings.LWJGL_OPENGL32);
+        }
         newSetting.setCustomRenderer(AwtPanelsContext.class);
         setSettings(newSetting);
         setPauseOnLostFocus(false);
@@ -41,6 +45,7 @@ public class SceneApplication extends SimpleApplication {
 
     private void attachPanel() {
         enqueue(new Callable() {
+            @Override
             public Object call() throws Exception {
                 panel.attachTo(true, viewPort, /*overlayView, */guiViewPort);
                 return null;