From f4706373618215e3868f9779b68f8da4918ebd37 Mon Sep 17 00:00:00 2001 From: Daniel Johansson Date: Thu, 24 Sep 2015 11:02:47 +0100 Subject: [PATCH] Fixed a build issue regarding lwjgl 3.x by now using 3.0.0a for longer stability as 3.0.0b-SNAPSHOT is a moving target and APIs are changing constantly. --- jme3-lwjgl3/build.gradle | 8 ++++---- .../main/java/com/jme3/system/lwjgl/LwjglContext.java | 10 ++++++---- .../main/java/com/jme3/system/lwjgl/LwjglWindow.java | 4 ++-- 3 files changed, 12 insertions(+), 10 deletions(-) diff --git a/jme3-lwjgl3/build.gradle b/jme3-lwjgl3/build.gradle index 3c7e4e646..e81175700 100644 --- a/jme3-lwjgl3/build.gradle +++ b/jme3-lwjgl3/build.gradle @@ -11,8 +11,8 @@ repositories { dependencies { compile project(':jme3-core') compile project(':jme3-desktop') - compile 'org.lwjgl:lwjgl:3.0.0b-SNAPSHOT' - compile group: 'org.lwjgl', name: 'lwjgl-platform', version: '3.0.0b-SNAPSHOT', classifier: 'natives-windows' - compile group: 'org.lwjgl', name: 'lwjgl-platform', version: '3.0.0b-SNAPSHOT', classifier: 'natives-linux' - compile group: 'org.lwjgl', name: 'lwjgl-platform', version: '3.0.0b-SNAPSHOT', classifier: 'natives-osx' + compile 'org.lwjgl:lwjgl:3.0.0a' + compile group: 'org.lwjgl', name: 'lwjgl-platform', version: '3.0.0a', classifier: 'natives-windows' + compile group: 'org.lwjgl', name: 'lwjgl-platform', version: '3.0.0a', classifier: 'natives-linux' + compile group: 'org.lwjgl', name: 'lwjgl-platform', version: '3.0.0a', classifier: 'natives-osx' } diff --git a/jme3-lwjgl3/src/main/java/com/jme3/system/lwjgl/LwjglContext.java b/jme3-lwjgl3/src/main/java/com/jme3/system/lwjgl/LwjglContext.java index 7f62a447e..f4d9a7b57 100644 --- a/jme3-lwjgl3/src/main/java/com/jme3/system/lwjgl/LwjglContext.java +++ b/jme3-lwjgl3/src/main/java/com/jme3/system/lwjgl/LwjglContext.java @@ -42,11 +42,13 @@ import com.jme3.renderer.lwjgl.LwjglGLExt; import com.jme3.renderer.lwjgl.LwjglGLFboEXT; import com.jme3.renderer.lwjgl.LwjglGLFboGL3; import com.jme3.renderer.opengl.*; -import com.jme3.renderer.opengl.GL; import com.jme3.system.*; import org.lwjgl.Sys; import org.lwjgl.glfw.GLFW; -import org.lwjgl.opengl.*; +import org.lwjgl.opengl.ARBDebugOutput; +import org.lwjgl.opengl.ARBFramebufferObject; +import org.lwjgl.opengl.ContextCapabilities; +import org.lwjgl.opengl.EXTFramebufferMultisample; import java.util.concurrent.atomic.AtomicBoolean; import java.util.logging.Level; @@ -132,7 +134,7 @@ public abstract class LwjglContext implements JmeContext { } protected void initContextFirstTime() { - final GLCapabilities capabilities = createCapabilities(settings.getRenderer().equals(AppSettings.LWJGL_OPENGL3)); + final ContextCapabilities capabilities = createCapabilities(settings.getRenderer().equals(AppSettings.LWJGL_OPENGL3)); if (!capabilities.OpenGL20) { throw new RendererException("OpenGL 2.0 or higher is required for jMonkeyEngine"); @@ -230,7 +232,7 @@ public abstract class LwjglContext implements JmeContext { while (created.get() != createdVal) { try { createdLock.wait(); - } catch (InterruptedException ex) { + } catch (InterruptedException ignored) { } } } diff --git a/jme3-lwjgl3/src/main/java/com/jme3/system/lwjgl/LwjglWindow.java b/jme3-lwjgl3/src/main/java/com/jme3/system/lwjgl/LwjglWindow.java index 2f00eb700..e1f4dcf73 100644 --- a/jme3-lwjgl3/src/main/java/com/jme3/system/lwjgl/LwjglWindow.java +++ b/jme3-lwjgl3/src/main/java/com/jme3/system/lwjgl/LwjglWindow.java @@ -99,7 +99,7 @@ public abstract class LwjglWindow extends LwjglContext implements Runnable { /** * Set the title if its a windowed display * - * @param title + * @param title the title to set */ public void setTitle(final String title) { if (created.get() && window != -1) { @@ -121,7 +121,7 @@ public abstract class LwjglWindow extends LwjglContext implements Runnable { /** * Apply the settings, changing resolution, etc. * - * @param settings + * @param settings the settings to apply when creating the context. */ protected void createContext(final AppSettings settings) { glfwSetErrorCallback(errorCallback = new GLFWErrorCallback() {