diff --git a/engine/lib/jogl/gluegen-rt-natives-linux-amd64.jar b/engine/lib/jogl/gluegen-rt-natives-linux-amd64.jar index d5f42f31b..8ae0af69d 100644 Binary files a/engine/lib/jogl/gluegen-rt-natives-linux-amd64.jar and b/engine/lib/jogl/gluegen-rt-natives-linux-amd64.jar differ diff --git a/engine/lib/jogl/gluegen-rt-natives-linux-armv6.jar b/engine/lib/jogl/gluegen-rt-natives-linux-armv6.jar index 6ec29e603..d49079f8e 100644 Binary files a/engine/lib/jogl/gluegen-rt-natives-linux-armv6.jar and b/engine/lib/jogl/gluegen-rt-natives-linux-armv6.jar differ diff --git a/engine/lib/jogl/gluegen-rt-natives-linux-armv6hf.jar b/engine/lib/jogl/gluegen-rt-natives-linux-armv6hf.jar index 150428090..b2740f541 100644 Binary files a/engine/lib/jogl/gluegen-rt-natives-linux-armv6hf.jar and b/engine/lib/jogl/gluegen-rt-natives-linux-armv6hf.jar differ diff --git a/engine/lib/jogl/gluegen-rt-natives-linux-i586.jar b/engine/lib/jogl/gluegen-rt-natives-linux-i586.jar index 1d2a0ee0f..f579929cc 100644 Binary files a/engine/lib/jogl/gluegen-rt-natives-linux-i586.jar and b/engine/lib/jogl/gluegen-rt-natives-linux-i586.jar differ diff --git a/engine/lib/jogl/gluegen-rt-natives-macosx-universal.jar b/engine/lib/jogl/gluegen-rt-natives-macosx-universal.jar index 2a4f43ea8..ec39e1f61 100644 Binary files a/engine/lib/jogl/gluegen-rt-natives-macosx-universal.jar and b/engine/lib/jogl/gluegen-rt-natives-macosx-universal.jar differ diff --git a/engine/lib/jogl/gluegen-rt-natives-solaris-amd64.jar b/engine/lib/jogl/gluegen-rt-natives-solaris-amd64.jar index 01819886d..ab46741b5 100644 Binary files a/engine/lib/jogl/gluegen-rt-natives-solaris-amd64.jar and b/engine/lib/jogl/gluegen-rt-natives-solaris-amd64.jar differ diff --git a/engine/lib/jogl/gluegen-rt-natives-solaris-i586.jar b/engine/lib/jogl/gluegen-rt-natives-solaris-i586.jar index 03a46f838..bc10b3985 100644 Binary files a/engine/lib/jogl/gluegen-rt-natives-solaris-i586.jar and b/engine/lib/jogl/gluegen-rt-natives-solaris-i586.jar differ diff --git a/engine/lib/jogl/gluegen-rt-natives-windows-amd64.jar b/engine/lib/jogl/gluegen-rt-natives-windows-amd64.jar index 88a2e1798..fd9187a80 100644 Binary files a/engine/lib/jogl/gluegen-rt-natives-windows-amd64.jar and b/engine/lib/jogl/gluegen-rt-natives-windows-amd64.jar differ diff --git a/engine/lib/jogl/gluegen-rt-natives-windows-i586.jar b/engine/lib/jogl/gluegen-rt-natives-windows-i586.jar index 52b24d317..d0a2b1d65 100644 Binary files a/engine/lib/jogl/gluegen-rt-natives-windows-i586.jar and b/engine/lib/jogl/gluegen-rt-natives-windows-i586.jar differ diff --git a/engine/lib/jogl/gluegen-rt.jar b/engine/lib/jogl/gluegen-rt.jar index e38159128..2c8708577 100644 Binary files a/engine/lib/jogl/gluegen-rt.jar and b/engine/lib/jogl/gluegen-rt.jar differ diff --git a/engine/lib/jogl/joal-natives-linux-amd64.jar b/engine/lib/jogl/joal-natives-linux-amd64.jar index 6167c0ed1..a45ecf7d2 100644 Binary files a/engine/lib/jogl/joal-natives-linux-amd64.jar and b/engine/lib/jogl/joal-natives-linux-amd64.jar differ diff --git a/engine/lib/jogl/joal-natives-linux-armv6.jar b/engine/lib/jogl/joal-natives-linux-armv6.jar index e81aa8a0e..a82a40a99 100644 Binary files a/engine/lib/jogl/joal-natives-linux-armv6.jar and b/engine/lib/jogl/joal-natives-linux-armv6.jar differ diff --git a/engine/lib/jogl/joal-natives-linux-armv6hf.jar b/engine/lib/jogl/joal-natives-linux-armv6hf.jar index 0d48e6311..0294d0344 100644 Binary files a/engine/lib/jogl/joal-natives-linux-armv6hf.jar and b/engine/lib/jogl/joal-natives-linux-armv6hf.jar differ diff --git a/engine/lib/jogl/joal-natives-linux-i586.jar b/engine/lib/jogl/joal-natives-linux-i586.jar index 7c6ae3bdf..6142037f8 100644 Binary files a/engine/lib/jogl/joal-natives-linux-i586.jar and b/engine/lib/jogl/joal-natives-linux-i586.jar differ diff --git a/engine/lib/jogl/joal-natives-macosx-universal.jar b/engine/lib/jogl/joal-natives-macosx-universal.jar index 080e5319e..a83717cb9 100644 Binary files a/engine/lib/jogl/joal-natives-macosx-universal.jar and b/engine/lib/jogl/joal-natives-macosx-universal.jar differ diff --git a/engine/lib/jogl/joal-natives-solaris-amd64.jar b/engine/lib/jogl/joal-natives-solaris-amd64.jar index 7f457063e..2b034d213 100644 Binary files a/engine/lib/jogl/joal-natives-solaris-amd64.jar and b/engine/lib/jogl/joal-natives-solaris-amd64.jar differ diff --git a/engine/lib/jogl/joal-natives-solaris-i586.jar b/engine/lib/jogl/joal-natives-solaris-i586.jar index 82f1d5990..789a83a21 100644 Binary files a/engine/lib/jogl/joal-natives-solaris-i586.jar and b/engine/lib/jogl/joal-natives-solaris-i586.jar differ diff --git a/engine/lib/jogl/joal-natives-windows-amd64.jar b/engine/lib/jogl/joal-natives-windows-amd64.jar index 9001b6302..d3e99c90e 100644 Binary files a/engine/lib/jogl/joal-natives-windows-amd64.jar and b/engine/lib/jogl/joal-natives-windows-amd64.jar differ diff --git a/engine/lib/jogl/joal-natives-windows-i586.jar b/engine/lib/jogl/joal-natives-windows-i586.jar index 5f9cddb67..1def44e61 100644 Binary files a/engine/lib/jogl/joal-natives-windows-i586.jar and b/engine/lib/jogl/joal-natives-windows-i586.jar differ diff --git a/engine/lib/jogl/joal.jar b/engine/lib/jogl/joal.jar index 727f1aa78..e0076f0ed 100644 Binary files a/engine/lib/jogl/joal.jar and b/engine/lib/jogl/joal.jar differ diff --git a/engine/lib/jogl/jogl-all-natives-linux-amd64.jar b/engine/lib/jogl/jogl-all-natives-linux-amd64.jar index b09b89a37..2e3ba7dac 100644 Binary files a/engine/lib/jogl/jogl-all-natives-linux-amd64.jar and b/engine/lib/jogl/jogl-all-natives-linux-amd64.jar differ diff --git a/engine/lib/jogl/jogl-all-natives-linux-armv6.jar b/engine/lib/jogl/jogl-all-natives-linux-armv6.jar index a6b0a260d..bac8aef19 100644 Binary files a/engine/lib/jogl/jogl-all-natives-linux-armv6.jar and b/engine/lib/jogl/jogl-all-natives-linux-armv6.jar differ diff --git a/engine/lib/jogl/jogl-all-natives-linux-armv6hf.jar b/engine/lib/jogl/jogl-all-natives-linux-armv6hf.jar index d3424ddd6..78d787eb0 100644 Binary files a/engine/lib/jogl/jogl-all-natives-linux-armv6hf.jar and b/engine/lib/jogl/jogl-all-natives-linux-armv6hf.jar differ diff --git a/engine/lib/jogl/jogl-all-natives-linux-i586.jar b/engine/lib/jogl/jogl-all-natives-linux-i586.jar index 42732d2cf..92340a5bb 100644 Binary files a/engine/lib/jogl/jogl-all-natives-linux-i586.jar and b/engine/lib/jogl/jogl-all-natives-linux-i586.jar differ diff --git a/engine/lib/jogl/jogl-all-natives-macosx-universal.jar b/engine/lib/jogl/jogl-all-natives-macosx-universal.jar index e1edc32c6..2c858dff0 100644 Binary files a/engine/lib/jogl/jogl-all-natives-macosx-universal.jar and b/engine/lib/jogl/jogl-all-natives-macosx-universal.jar differ diff --git a/engine/lib/jogl/jogl-all-natives-solaris-amd64.jar b/engine/lib/jogl/jogl-all-natives-solaris-amd64.jar index 55ca5e9d5..ce87ac728 100644 Binary files a/engine/lib/jogl/jogl-all-natives-solaris-amd64.jar and b/engine/lib/jogl/jogl-all-natives-solaris-amd64.jar differ diff --git a/engine/lib/jogl/jogl-all-natives-solaris-i586.jar b/engine/lib/jogl/jogl-all-natives-solaris-i586.jar index 89cbfacd1..c57c04ea4 100644 Binary files a/engine/lib/jogl/jogl-all-natives-solaris-i586.jar and b/engine/lib/jogl/jogl-all-natives-solaris-i586.jar differ diff --git a/engine/lib/jogl/jogl-all-natives-windows-amd64.jar b/engine/lib/jogl/jogl-all-natives-windows-amd64.jar index 31f6b4ba4..fc05e380d 100644 Binary files a/engine/lib/jogl/jogl-all-natives-windows-amd64.jar and b/engine/lib/jogl/jogl-all-natives-windows-amd64.jar differ diff --git a/engine/lib/jogl/jogl-all-natives-windows-i586.jar b/engine/lib/jogl/jogl-all-natives-windows-i586.jar index 4664f9d94..d54815588 100644 Binary files a/engine/lib/jogl/jogl-all-natives-windows-i586.jar and b/engine/lib/jogl/jogl-all-natives-windows-i586.jar differ diff --git a/engine/lib/jogl/jogl-all.jar b/engine/lib/jogl/jogl-all.jar index 8ed4b24e5..2ebd0ccf3 100644 Binary files a/engine/lib/jogl/jogl-all.jar and b/engine/lib/jogl/jogl-all.jar differ diff --git a/engine/src/core/com/jme3/app/Application.java b/engine/src/core/com/jme3/app/Application.java index e34cc0ba0..6014d1057 100644 --- a/engine/src/core/com/jme3/app/Application.java +++ b/engine/src/core/com/jme3/app/Application.java @@ -380,6 +380,8 @@ public class Application implements SystemListener { if (settings == null){ settings = new AppSettings(true); } + settings.setRenderer("JOGL"); + settings.setAudioRenderer("JOAL"); logger.log(Level.FINE, "Starting application: {0}", getClass().getName()); context = JmeSystem.newContext(settings, contextType); diff --git a/engine/src/jogl/com/jme3/input/jogl/NewtMouseInput.java b/engine/src/jogl/com/jme3/input/jogl/NewtMouseInput.java index 51ae8a0f6..65c749f10 100644 --- a/engine/src/jogl/com/jme3/input/jogl/NewtMouseInput.java +++ b/engine/src/jogl/com/jme3/input/jogl/NewtMouseInput.java @@ -205,7 +205,8 @@ public class NewtMouseInput implements MouseInput, MouseListener { public void mouseWheelMoved(MouseEvent awtEvt) { //FIXME not sure this is the right way to handle this case - float dwheel = awtEvt.getWheelRotation(); + // [0] should be used when the shift key is down + float dwheel = awtEvt.getRotation()[1]; wheelPos += dwheel * WHEEL_AMP; cursorMoved = true; } diff --git a/engine/src/jogl/com/jme3/renderer/jogl/JoglRenderer.java b/engine/src/jogl/com/jme3/renderer/jogl/JoglRenderer.java index 95ec79a59..9f8a1b6f3 100644 --- a/engine/src/jogl/com/jme3/renderer/jogl/JoglRenderer.java +++ b/engine/src/jogl/com/jme3/renderer/jogl/JoglRenderer.java @@ -31,25 +31,6 @@ */ package com.jme3.renderer.jogl; -import java.nio.Buffer; -import java.nio.ByteBuffer; -import java.nio.FloatBuffer; -import java.nio.IntBuffer; -import java.util.EnumSet; -import java.util.List; -import java.util.logging.Level; -import java.util.logging.Logger; - -import javax.media.opengl.GL; -import javax.media.opengl.GL2; -import javax.media.opengl.GL2ES1; -import javax.media.opengl.GL2ES2; -import javax.media.opengl.GL2GL3; -import javax.media.opengl.GLContext; - -import jme3tools.converters.MipMapGenerator; -import jme3tools.shader.ShaderDebug; - import com.jme3.light.LightList; import com.jme3.material.RenderState; import com.jme3.math.ColorRGBA; @@ -83,7 +64,24 @@ import com.jme3.util.BufferUtils; import com.jme3.util.ListMap; import com.jme3.util.NativeObjectManager; import com.jme3.util.SafeArrayList; +import java.nio.Buffer; +import java.nio.ByteBuffer; +import java.nio.FloatBuffer; +import java.nio.IntBuffer; +import java.util.EnumSet; +import java.util.List; +import java.util.logging.Level; +import java.util.logging.Logger; import javax.media.nativewindow.NativeWindowFactory; +import javax.media.opengl.GL; +import javax.media.opengl.GL2; +import javax.media.opengl.GL2ES1; +import javax.media.opengl.GL2ES2; +import javax.media.opengl.GL2GL3; +import javax.media.opengl.GL3; +import javax.media.opengl.GLContext; +import jme3tools.converters.MipMapGenerator; +import jme3tools.shader.ShaderDebug; public class JoglRenderer implements Renderer { @@ -376,11 +374,11 @@ public class JoglRenderer implements Renderer { if (gl.isExtensionAvailable("GL_ARB_texture_multisample")) { caps.add(Caps.TextureMultisample); - gl.glGetIntegerv(GL2GL3.GL_MAX_COLOR_TEXTURE_SAMPLES, intBuf16); + gl.glGetIntegerv(GL3.GL_MAX_COLOR_TEXTURE_SAMPLES, intBuf16); maxColorTexSamples = intBuf16.get(0); logger.log(Level.FINER, "Texture Multisample Color Samples: {0}", maxColorTexSamples); - gl.glGetIntegerv(GL2GL3.GL_MAX_DEPTH_TEXTURE_SAMPLES, intBuf16); + gl.glGetIntegerv(GL3.GL_MAX_DEPTH_TEXTURE_SAMPLES, intBuf16); maxDepthTexSamples = intBuf16.get(0); logger.log(Level.FINER, "Texture Multisample Depth Samples: {0}", maxDepthTexSamples); } @@ -1543,7 +1541,7 @@ public class JoglRenderer implements Renderer { GL gl = GLContext.getCurrentGL(); if (gl.isGL2GL3()) { for (int i = 0; i < samplePositions.length; i++) { - gl.getGL2GL3().glGetMultisamplefv(GL2GL3.GL_SAMPLE_POSITION, i, samplePos); + gl.getGL3().glGetMultisamplefv(GL3.GL_SAMPLE_POSITION, i, samplePos); samplePos.clear(); samplePositions[i] = new Vector2f(samplePos.get(0) - 0.5f, samplePos.get(1) - 0.5f); @@ -1754,13 +1752,13 @@ public class JoglRenderer implements Renderer { switch (type) { case TwoDimensional: if (samples > 1) { - return GL2GL3.GL_TEXTURE_2D_MULTISAMPLE; + return GL3.GL_TEXTURE_2D_MULTISAMPLE; } else { return GL.GL_TEXTURE_2D; } case TwoDimensionalArray: if (samples > 1) { - return GL2GL3.GL_TEXTURE_2D_MULTISAMPLE_ARRAY; + return GL3.GL_TEXTURE_2D_MULTISAMPLE_ARRAY; } else { return GL.GL_TEXTURE_2D_ARRAY; } diff --git a/engine/src/jogl/com/jme3/renderer/jogl/TextureUtil.java b/engine/src/jogl/com/jme3/renderer/jogl/TextureUtil.java index a3fc6cd38..704fb43e5 100644 --- a/engine/src/jogl/com/jme3/renderer/jogl/TextureUtil.java +++ b/engine/src/jogl/com/jme3/renderer/jogl/TextureUtil.java @@ -32,18 +32,16 @@ package com.jme3.renderer.jogl; +import com.jme3.renderer.RendererException; +import com.jme3.texture.Image; +import com.jme3.texture.Image.Format; import java.nio.ByteBuffer; - import javax.media.opengl.GL; import javax.media.opengl.GL2; import javax.media.opengl.GL2ES2; import javax.media.opengl.GL2GL3; import javax.media.opengl.GLContext; -import com.jme3.renderer.RendererException; -import com.jme3.texture.Image; -import com.jme3.texture.Image.Format; - public class TextureUtil { private static boolean abgrToRgbaConversionEnabled = false; @@ -105,13 +103,13 @@ public class TextureUtil { // Luminance formats setFormat(Format.Luminance8, GL2.GL_LUMINANCE8, GL.GL_LUMINANCE, GL.GL_UNSIGNED_BYTE, false); setFormat(Format.Luminance16, GL2.GL_LUMINANCE16, GL.GL_LUMINANCE, GL.GL_UNSIGNED_SHORT, false); - setFormat(Format.Luminance16F, GL.GL_LUMINANCE16F_ARB, GL.GL_LUMINANCE, GL.GL_HALF_FLOAT, false); - setFormat(Format.Luminance32F, GL.GL_LUMINANCE32F_ARB, GL.GL_LUMINANCE, GL.GL_FLOAT, false); + setFormat(Format.Luminance16F, GL2.GL_LUMINANCE16F, GL.GL_LUMINANCE, GL.GL_HALF_FLOAT, false); + setFormat(Format.Luminance32F, GL2.GL_LUMINANCE32F, GL.GL_LUMINANCE, GL.GL_FLOAT, false); // Luminance alpha formats setFormat(Format.Luminance8Alpha8, GL2.GL_LUMINANCE8_ALPHA8, GL.GL_LUMINANCE_ALPHA, GL.GL_UNSIGNED_BYTE, false); setFormat(Format.Luminance16Alpha16, GL2.GL_LUMINANCE16_ALPHA16, GL.GL_LUMINANCE_ALPHA, GL.GL_UNSIGNED_SHORT, false); - setFormat(Format.Luminance16FAlpha16F, GL.GL_LUMINANCE_ALPHA16F_ARB, GL.GL_LUMINANCE_ALPHA, GL.GL_HALF_FLOAT, false); + setFormat(Format.Luminance16FAlpha16F, GL2.GL_LUMINANCE_ALPHA16F, GL.GL_LUMINANCE_ALPHA, GL.GL_HALF_FLOAT, false); // Depth formats setFormat(Format.Depth, GL2ES2.GL_DEPTH_COMPONENT, GL2ES2.GL_DEPTH_COMPONENT, GL.GL_UNSIGNED_BYTE, false); @@ -368,7 +366,7 @@ public class TextureUtil { }else{ if (samples > 1){ if (gl.isGL2GL3()) { - gl.getGL2GL3().glTexImage2DMultisample(target, + gl.getGL3().glTexImage2DMultisample(target, samples, glFmt.internalFormat, mipWidth,