* When specifying OPENGL3 in AppSettings, it is now Mac OS X compatible

git-svn-id: https://jmonkeyengine.googlecode.com/svn/trunk@9875 75d07b2b-3a1a-0410-a2c5-0572b91ccdca
3.0
Sha..rd 12 years ago
parent 4d01146519
commit 60f52b8ea6
  1. 7
      engine/src/core/com/jme3/system/AppSettings.java
  2. 14
      engine/src/lwjgl/com/jme3/system/lwjgl/LwjglContext.java

@ -76,11 +76,12 @@ public final class AppSettings extends HashMap<String, Object> {
/** /**
* Use LWJGL as the display system and force using the core OpenGL3.3 renderer. * Use LWJGL as the display system and force using the core OpenGL3.3 renderer.
* <p> * <p>
* If the underlying system does not support OpenGL3.3, then the context * If the underlying system does not support OpenGL3.2, then the context
* initialization will throw an exception. Note that currently jMonkeyEngine * initialization will throw an exception. Note that currently jMonkeyEngine
* does not have any shaders that support OpenGL3.3 therefore this * does not have any shaders that support OpenGL3.2 therefore this
* option is not useful. * option is not useful.
* * <p>
* Note: OpenGL 3.2 is used to give 3.x support to Mac users.
* *
* @see AppSettings#setRenderer(java.lang.String) * @see AppSettings#setRenderer(java.lang.String)
*/ */

@ -93,20 +93,20 @@ public abstract class LwjglContext implements JmeContext {
} }
} }
protected ContextAttribs createContextAttribs(){ protected ContextAttribs createContextAttribs() {
if (settings.getBoolean("GraphicsDebug") || settings.getRenderer().equals(AppSettings.LWJGL_OPENGL3)){ if (settings.getBoolean("GraphicsDebug") || settings.getRenderer().equals(AppSettings.LWJGL_OPENGL3)) {
ContextAttribs attr; ContextAttribs attr;
if (settings.getRenderer().equals(AppSettings.LWJGL_OPENGL3)){ if (settings.getRenderer().equals(AppSettings.LWJGL_OPENGL3)) {
attr = new ContextAttribs(3, 3); attr = new ContextAttribs(3, 2);
attr = attr.withProfileCore(true).withForwardCompatible(true).withProfileCompatibility(false); attr = attr.withProfileCore(true).withForwardCompatible(true).withProfileCompatibility(false);
}else{ } else {
attr = new ContextAttribs(); attr = new ContextAttribs();
} }
if (settings.getBoolean("GraphicsDebug")){ if (settings.getBoolean("GraphicsDebug")) {
attr = attr.withDebug(true); attr = attr.withDebug(true);
} }
return attr; return attr;
}else{ } else {
return null; return null;
} }
} }

Loading…
Cancel
Save