diff --git a/jme3-core/src/main/java/com/jme3/opencl/package-info.java b/jme3-core/src/main/java/com/jme3/opencl/package-info.java index 0a3552d5f..eb34f06ce 100644 --- a/jme3-core/src/main/java/com/jme3/opencl/package-info.java +++ b/jme3-core/src/main/java/com/jme3/opencl/package-info.java @@ -153,10 +153,6 @@ package com.jme3.opencl; * thrown. The exception always records the error code and error name and the * OpenCL function call where the error was detected. Please check the official * OpenCL specification for the meanings of these errors for that particular function. - *
- * N.B: This backend is EXPERIMENTAL - * - * @see AppSettings#setRenderer(java.lang.String) - */ - public static final String JOGL_OPENGL_FORWARD_COMPATIBLE = "JOGL_OPENGL_FORWARD_COMPATIBLE"; - - /** - * Use JogAmp's JOGL as the display system with the backward compatible profile - *
- * N.B: This backend is EXPERIMENTAL - * - * @see AppSettings#setRenderer(java.lang.String) - */ - public static final String JOGL_OPENGL_BACKWARD_COMPATIBLE = "JOGL_OPENGL_BACKWARD_COMPATIBLE"; - - /** - * Use JogAmp's JOAL as the display system - *
- * N.B: This backend is EXPERIMENTAL
- *
- * @see AppSettings#setRenderer(java.lang.String)
- */
- public static final String JOAL = "JOAL";
static {
defaults.put("Width", 640);
@@ -504,7 +477,7 @@ public final class AppSettings extends HashMap
* If the key is not set, then false is returned.
@@ -887,7 +860,7 @@ public final class AppSettings extends HashMap
- * The icon is used for the settings window, and the LWJGL render window. Not currently supported for JOGL.
+ * The icon is used for the settings window, and the LWJGL render window.
* Note that a bug in Java 6 (bug ID 6445278, currently hidden but available in Google cache) currently prevents
* the icon working for alt-tab on the settings dialog in Windows.
*
diff --git a/jme3-desktop/src/main/java/com/jme3/system/JmeDesktopSystem.java b/jme3-desktop/src/main/java/com/jme3/system/JmeDesktopSystem.java
index b489eaa9a..864d492ee 100644
--- a/jme3-desktop/src/main/java/com/jme3/system/JmeDesktopSystem.java
+++ b/jme3-desktop/src/main/java/com/jme3/system/JmeDesktopSystem.java
@@ -221,36 +221,6 @@ public class JmeDesktopSystem extends JmeSystemDelegate {
return null;
}
- private JmeContext newContextJogl(AppSettings settings, JmeContext.Type type) {
- try {
- Class extends JmeContext> ctxClazz = null;
- switch (type) {
- case Display:
- ctxClazz = (Class extends JmeContext>) Class.forName("com.jme3.system.jogl.JoglNewtDisplay");
- break;
- case Canvas:
- ctxClazz = (Class extends JmeContext>) Class.forName("com.jme3.system.jogl.JoglNewtCanvas");
- break;
- case OffscreenSurface:
- ctxClazz = (Class extends JmeContext>) Class.forName("com.jme3.system.jogl.JoglOffscreenBuffer");
- break;
- default:
- throw new IllegalArgumentException("Unsupported context type " + type);
- }
-
- return ctxClazz.newInstance();
- } catch (InstantiationException ex) {
- logger.log(Level.SEVERE, "Failed to create context", ex);
- } catch (IllegalAccessException ex) {
- logger.log(Level.SEVERE, "Failed to create context", ex);
- } catch (ClassNotFoundException ex) {
- logger.log(Level.SEVERE, "CRITICAL ERROR: Context class is missing!\n"
- + "Make sure jme3_jogl is on the classpath.", ex);
- }
-
- return null;
- }
-
private JmeContext newContextCustom(AppSettings settings, JmeContext.Type type) {
try {
String className = settings.getRenderer().substring("CUSTOM".length());
@@ -281,9 +251,6 @@ public class JmeDesktopSystem extends JmeSystemDelegate {
} else if (settings.getRenderer().startsWith("LWJGL")) {
ctx = newContextLwjgl(settings, contextType);
ctx.setSettings(settings);
- } else if (settings.getRenderer().startsWith("JOGL")) {
- ctx = newContextJogl(settings, contextType);
- ctx.setSettings(settings);
} else if (settings.getRenderer().startsWith("CUSTOM")) {
ctx = newContextCustom(settings, contextType);
ctx.setSettings(settings);
@@ -301,7 +268,7 @@ public class JmeDesktopSystem extends JmeSystemDelegate {
return clazz.newInstance();
} catch (ClassNotFoundException ex) {
logger.log(Level.SEVERE, "CRITICAL ERROR: Audio implementation class is missing!\n"
- + "Make sure jme3_lwjgl-oal or jm3_joal is on the classpath.", ex);
+ + "Make sure jme3_lwjgl-oal is on the classpath.", ex);
} catch (IllegalAccessException ex) {
logger.log(Level.SEVERE, "Failed to create context", ex);
} catch (InstantiationException ex) {
@@ -322,10 +289,6 @@ public class JmeDesktopSystem extends JmeSystemDelegate {
al = newObject("com.jme3.audio.lwjgl.LwjglAL");
alc = newObject("com.jme3.audio.lwjgl.LwjglALC");
efx = newObject("com.jme3.audio.lwjgl.LwjglEFX");
- } else if (settings.getAudioRenderer().startsWith("JOAL")) {
- al = newObject("com.jme3.audio.joal.JoalAL");
- alc = newObject("com.jme3.audio.joal.JoalALC");
- efx = newObject("com.jme3.audio.joal.JoalEFX");
} else {
throw new UnsupportedOperationException(
"Unrecognizable audio renderer specified: "
diff --git a/jme3-examples/build.gradle b/jme3-examples/build.gradle
index 7989235c4..ab352cb73 100644
--- a/jme3-examples/build.gradle
+++ b/jme3-examples/build.gradle
@@ -29,7 +29,6 @@ dependencies {
// compile project(':jme3-jbullet')
compile project(':jme3-jogg')
- compile project(':jme3-jogl')
compile project(':jme3-lwjgl')
// compile project(':jme3-lwjgl3')
compile project(':jme3-networking')
@@ -60,7 +59,7 @@ jar.doFirst{
}
}
-task dist (dependsOn: ['build', ':jme3-jogl:jar', ':jme3-bullet:jar', ':jme3-android:jar', \
+task dist (dependsOn: ['build', ':jme3-bullet:jar', ':jme3-android:jar', \
':jme3-android-native:jar', ':jme3-bullet-native-android:jar', \
':jme3-bullet-native:jar']) {
doLast {
@@ -81,24 +80,6 @@ task dist (dependsOn: ['build', ':jme3-jogl:jar', ':jme3-bullet:jar', ':jme3-and
into '../dist'
rename { "jMonkeyEngine3.jar" }
}
- // Copy JOGL packages, remove version
- def config = project(':jme3-jogl').configurations.runtime.copyRecursive({ !(it instanceof ProjectDependency); })
- config.resolvedConfiguration.resolvedArtifacts.each {artifact ->
- copy{
- from artifact.file
- into '../dist/opt/jogl/lib'
- if(artifact.classifier != null){
- rename { "${artifact.name}-${artifact.classifier}.${artifact.extension}" }
- } else{
- rename { "${artifact.name}.${artifact.extension}" }
- }
- }
- }
- copy {
- from project(':jme3-jogl').jar.archivePath
- into '../dist/opt/jogl'
- rename {project(':jme3-jogl').name+".jar"}
- }
// Copy bullet packages, remove version
copy {
@@ -129,4 +110,4 @@ task dist (dependsOn: ['build', ':jme3-jogl:jar', ':jme3-bullet:jar', ':jme3-and
rename {project(':jme3-bullet-native-android').name+".jar"}
}
}
-}
\ No newline at end of file
+}
diff --git a/jme3-examples/src/main/java/jme3test/awt/TestApplet.java b/jme3-examples/src/main/java/jme3test/awt/TestApplet.java
index 9f052fc50..2c5f11e65 100644
--- a/jme3-examples/src/main/java/jme3test/awt/TestApplet.java
+++ b/jme3-examples/src/main/java/jme3test/awt/TestApplet.java
@@ -57,7 +57,7 @@ public class TestApplet extends Applet {
AppSettings settings = new AppSettings(true);
settings.setWidth(640);
settings.setHeight(480);
-// settings.setRenderer(AppSettings.JOGL);
+ settings.setRenderer(AppSettings.LWJGL_OPENGL2);
JmeSystem.setLowPermissions(true);
diff --git a/jme3-examples/src/main/java/jme3test/opencl/HelloOpenCL.java b/jme3-examples/src/main/java/jme3test/opencl/HelloOpenCL.java
index e08802785..737547fca 100644
--- a/jme3-examples/src/main/java/jme3test/opencl/HelloOpenCL.java
+++ b/jme3-examples/src/main/java/jme3test/opencl/HelloOpenCL.java
@@ -58,7 +58,7 @@ public class HelloOpenCL extends SimpleApplication {
AppSettings settings = new AppSettings(true);
settings.setOpenCLSupport(true);
settings.setVSync(true);
-// settings.setRenderer(AppSettings.JOGL_OPENGL_FORWARD_COMPATIBLE);
+ settings.setRenderer(AppSettings.LWJGL_OPENGL2);
app.setSettings(settings);
app.start(); // start the game
}
@@ -308,4 +308,4 @@ public class HelloOpenCL extends SimpleApplication {
}
return true;
}
-}
\ No newline at end of file
+}
diff --git a/jme3-examples/src/main/java/jme3test/opencl/TestContextSwitching.java b/jme3-examples/src/main/java/jme3test/opencl/TestContextSwitching.java
index a1d87899d..27776abde 100644
--- a/jme3-examples/src/main/java/jme3test/opencl/TestContextSwitching.java
+++ b/jme3-examples/src/main/java/jme3test/opencl/TestContextSwitching.java
@@ -46,7 +46,7 @@ import java.util.logging.Level;
import java.util.logging.Logger;
/**
- *
+ *
* @author Sebastian Weiss
*/
public class TestContextSwitching extends SimpleApplication implements ScreenController {
@@ -79,7 +79,7 @@ public class TestContextSwitching extends SimpleApplication implements ScreenCon
settings.setWidth(800);
settings.setHeight(600);
settings.setOpenCLPlatformChooser(CustomPlatformChooser.class);
- //settings.setRenderer(AppSettings.JOGL_OPENGL_FORWARD_COMPATIBLE);
+ settings.setRenderer(AppSettings.LWJGL_OPENGL2);
setSettings(settings);
setShowSettings(false);
@@ -252,3 +252,4 @@ public class TestContextSwitching extends SimpleApplication implements ScreenCon
}
}
+
diff --git a/jme3-examples/src/main/java/jme3test/opencl/TestMultipleApplications.java b/jme3-examples/src/main/java/jme3test/opencl/TestMultipleApplications.java
index d5ddf9e4b..c2005c6c0 100644
--- a/jme3-examples/src/main/java/jme3test/opencl/TestMultipleApplications.java
+++ b/jme3-examples/src/main/java/jme3test/opencl/TestMultipleApplications.java
@@ -71,7 +71,7 @@ public class TestMultipleApplications extends SimpleApplication {
settings.setOpenCLSupport(true);
settings.setVSync(true);
settings.setOpenCLPlatformChooser(CustomPlatformChooser.class);
- settings.setRenderer(AppSettings.JOGL_OPENGL_FORWARD_COMPATIBLE);
+ settings.setRenderer(AppSettings.LWJGL_OPENGL2);
for (int i=0; i<2; ++i) {
new Thread() {
@Override
diff --git a/jme3-examples/src/main/java/jme3test/opencl/TestOpenCLLibraries.java b/jme3-examples/src/main/java/jme3test/opencl/TestOpenCLLibraries.java
index b057a15bb..2a712314c 100644
--- a/jme3-examples/src/main/java/jme3test/opencl/TestOpenCLLibraries.java
+++ b/jme3-examples/src/main/java/jme3test/opencl/TestOpenCLLibraries.java
@@ -59,7 +59,7 @@ public class TestOpenCLLibraries extends SimpleApplication {
AppSettings settings = new AppSettings(true);
settings.setOpenCLSupport(true);
settings.setVSync(true);
-// settings.setRenderer(AppSettings.JOGL_OPENGL_FORWARD_COMPATIBLE);
+ settings.setRenderer(AppSettings.LWJGL_OPENGL2);
app.setSettings(settings);
app.start(); // start the game
}
@@ -398,4 +398,4 @@ public class TestOpenCLLibraries extends SimpleApplication {
}
return true;
}
-}
\ No newline at end of file
+}
diff --git a/jme3-examples/src/main/java/jme3test/opencl/TestVertexBufferSharing.java b/jme3-examples/src/main/java/jme3test/opencl/TestVertexBufferSharing.java
index e25094f38..7a63a4fd3 100644
--- a/jme3-examples/src/main/java/jme3test/opencl/TestVertexBufferSharing.java
+++ b/jme3-examples/src/main/java/jme3test/opencl/TestVertexBufferSharing.java
@@ -49,7 +49,7 @@ import java.nio.file.Files;
import java.util.logging.Level;
import java.util.logging.Logger;
-/**
+/**
* This test class tests the capability to read and modify an OpenGL vertex buffer.
* It is also shown how to use the program binaries to implement a simple program
* cache.
@@ -72,7 +72,7 @@ public class TestVertexBufferSharing extends SimpleApplication {
AppSettings settings = new AppSettings(true);
settings.setOpenCLSupport(true);
settings.setVSync(false);
-// settings.setRenderer(AppSettings.JOGL_OPENGL_FORWARD_COMPATIBLE);
+ settings.setRenderer(AppSettings.LWJGL_OPENGL2);
app.setSettings(settings);
app.start(); // start the game
}
@@ -180,4 +180,4 @@ public class TestVertexBufferSharing extends SimpleApplication {
buffer.releaseBufferForSharingNoEvent(clQueue);
}
-}
\ No newline at end of file
+}
diff --git a/jme3-examples/src/main/java/jme3test/opencl/TestWriteToTexture.java b/jme3-examples/src/main/java/jme3test/opencl/TestWriteToTexture.java
index 6feeab4b9..d3d4458bb 100644
--- a/jme3-examples/src/main/java/jme3test/opencl/TestWriteToTexture.java
+++ b/jme3-examples/src/main/java/jme3test/opencl/TestWriteToTexture.java
@@ -51,7 +51,7 @@ import java.util.logging.Logger;
*
* In addition, this test shows how to use {@link ProgramCache}.
*
- * @author shaman
+ * @author shaman
*/
public class TestWriteToTexture extends SimpleApplication implements AnalogListener, ActionListener {
private static final Logger LOG = Logger.getLogger(TestWriteToTexture.class.getName());
@@ -72,7 +72,7 @@ public class TestWriteToTexture extends SimpleApplication implements AnalogListe
AppSettings settings = new AppSettings(true);
settings.setOpenCLSupport(true);
settings.setVSync(false);
-// settings.setRenderer(AppSettings.JOGL_OPENGL_FORWARD_COMPATIBLE);
+ settings.setRenderer(AppSettings.LWJGL_OPENGL2);
app.setSettings(settings);
app.start(); // start the game
}
@@ -177,4 +177,4 @@ public class TestWriteToTexture extends SimpleApplication implements AnalogListe
inputManager.setCursorVisible(!isPressed);
}
}
-}
\ No newline at end of file
+}
diff --git a/jme3-examples/src/main/java/jme3test/water/TestMultiPostWater.java b/jme3-examples/src/main/java/jme3test/water/TestMultiPostWater.java
index 9e9caf9d0..b7660b1c2 100644
--- a/jme3-examples/src/main/java/jme3test/water/TestMultiPostWater.java
+++ b/jme3-examples/src/main/java/jme3test/water/TestMultiPostWater.java
@@ -27,7 +27,7 @@ import java.util.List;
/**
* test
- *
+ *
* @author normenhansen
*/
public class TestMultiPostWater extends SimpleApplication {
@@ -43,9 +43,6 @@ public class TestMultiPostWater extends SimpleApplication {
AppSettings s = new AppSettings(true);
s.setRenderer(AppSettings.LWJGL_OPENGL2);
s.setAudioRenderer(AppSettings.LWJGL_OPENAL);
-//
-// s.setRenderer("JOGL");
-// s.setAudioRenderer("JOAL");
app.setSettings(s);
app.start();
diff --git a/jme3-jogl/build.gradle b/jme3-jogl/build.gradle
deleted file mode 100644
index b71be027a..000000000
--- a/jme3-jogl/build.gradle
+++ /dev/null
@@ -1,12 +0,0 @@
-if (!hasProperty('mainClass')) {
- ext.mainClass = ''
-}
-
-dependencies {
- compile project(':jme3-core')
- compile project(':jme3-desktop')
- compile 'org.jogamp.gluegen:gluegen-rt-main:2.3.2'
- compile 'org.jogamp.jogl:jogl-all-main:2.3.2'
- compile 'org.jogamp.joal:joal-main:2.3.2'
- compile 'org.jogamp.jocl:jocl-main:2.3.2'
-}
diff --git a/jme3-jogl/src/main/java/com/jme3/audio/joal/JoalAL.java b/jme3-jogl/src/main/java/com/jme3/audio/joal/JoalAL.java
deleted file mode 100644
index a487c3bfe..000000000
--- a/jme3-jogl/src/main/java/com/jme3/audio/joal/JoalAL.java
+++ /dev/null
@@ -1,158 +0,0 @@
-/*
- * Copyright (c) 2009-2020 jMonkeyEngine
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are
- * met:
- *
- * * Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- *
- * * Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- *
- * * Neither the name of 'jMonkeyEngine' nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
- * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
- * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
- * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
- * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
- * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
- * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
- * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
- * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
- * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-package com.jme3.audio.joal;
-
-import com.jme3.util.BufferUtils;
-import com.jogamp.openal.AL;
-import com.jogamp.openal.ALFactory;
-import java.nio.ByteBuffer;
-import java.nio.FloatBuffer;
-import java.nio.IntBuffer;
-
-/**
- * Exposes OpenAL functions via JOAL.
- *
- * @author Kirill Vainer
- */
-public final class JoalAL implements com.jme3.audio.openal.AL {
-
- private final AL joalAl;
-
- public JoalAL() {
- this.joalAl = ALFactory.getAL();
- }
-
- @Override
- public String alGetString(int parameter) {
- return joalAl.alGetString(parameter);
- }
-
- @Override
- public int alGenSources() {
- IntBuffer ib = BufferUtils.createIntBuffer(1);
- joalAl.alGenSources(1, ib);
- return ib.get(0);
- }
-
- @Override
- public int alGetError() {
- return joalAl.alGetError();
- }
-
- @Override
- public void alDeleteSources(int numSources, IntBuffer sources) {
- joalAl.alDeleteSources(numSources, sources);
- }
-
- @Override
- public void alGenBuffers(int numBuffers, IntBuffer buffers) {
- joalAl.alGenBuffers(numBuffers, buffers);
- }
-
- @Override
- public void alDeleteBuffers(int numBuffers, IntBuffer buffers) {
- joalAl.alDeleteBuffers(numBuffers, buffers);
- }
-
- @Override
- public void alSourceStop(int source) {
- joalAl.alSourceStop(source);
- }
-
- @Override
- public void alSourcei(int source, int param, int value) {
- joalAl.alSourcei(source, param, value);
- }
-
- @Override
- public void alBufferData(int buffer, int format, ByteBuffer data, int size, int frequency) {
- joalAl.alBufferData(buffer, format, data, size, frequency);
- }
-
- @Override
- public void alSourcePlay(int source) {
- joalAl.alSourcePlay(source);
- }
-
- @Override
- public void alSourcePause(int source) {
- joalAl.alSourcePause(source);
- }
-
- @Override
- public void alSourcef(int source, int param, float value) {
- joalAl.alSourcef(source, param, value);
- }
-
- @Override
- public void alSource3f(int source, int param, float value1, float value2, float value3) {
- joalAl.alSource3f(source, param, value1, value2, value3);
- }
-
- @Override
- public int alGetSourcei(int source, int param) {
- IntBuffer ib = BufferUtils.createIntBuffer(1);
- joalAl.alGetSourcei(source, param, ib);
- return ib.get(0);
- }
-
- @Override
- public void alSourceUnqueueBuffers(int source, int numBuffers, IntBuffer buffers) {
- joalAl.alSourceUnqueueBuffers(source, numBuffers, buffers);
- }
-
- @Override
- public void alSourceQueueBuffers(int source, int numBuffers, IntBuffer buffers) {
- joalAl.alSourceQueueBuffers(source, numBuffers, buffers);
- }
-
- @Override
- public void alListener(int param, FloatBuffer data) {
- joalAl.alListenerfv(param, data);
- }
-
- @Override
- public void alListenerf(int param, float value) {
- joalAl.alListenerf(param, value);
- }
-
- @Override
- public void alListener3f(int param, float value1, float value2, float value3) {
- joalAl.alListener3f(param, value1, value2, value3);
- }
-
- @Override
- public void alSource3i(int source, int param, int value1, int value2, int value3) {
- joalAl.alSource3i(source, param, value1, value2, value3);
- }
-}
diff --git a/jme3-jogl/src/main/java/com/jme3/audio/joal/JoalALC.java b/jme3-jogl/src/main/java/com/jme3/audio/joal/JoalALC.java
deleted file mode 100644
index 4e1e05bb1..000000000
--- a/jme3-jogl/src/main/java/com/jme3/audio/joal/JoalALC.java
+++ /dev/null
@@ -1,152 +0,0 @@
-/*
- * Copyright (c) 2009-2020 jMonkeyEngine
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are
- * met:
- *
- * * Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- *
- * * Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- *
- * * Neither the name of 'jMonkeyEngine' nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
- * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
- * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
- * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
- * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
- * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
- * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
- * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
- * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
- * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-package com.jme3.audio.joal;
-
-import com.jogamp.openal.ALCcontext;
-import com.jogamp.openal.ALCdevice;
-import com.jogamp.openal.ALFactory;
-import com.jogamp.openal.util.ALut;
-import java.nio.IntBuffer;
-
-/**
- * Exposes ALC functions via JOAL.
- *
- * @author Kirill Vainer
- */
-public final class JoalALC implements com.jme3.audio.openal.ALC {
-
- private final com.jogamp.openal.ALC joalAlc;
-
- public JoalALC() {
- joalAlc = ALFactory.getALC();
- }
-
- private ALCdevice getALCDevice() {
- ALCcontext ctx = joalAlc.alcGetCurrentContext();
-
- if (ctx == null) {
- return null;
- }
-
- ALCdevice device = joalAlc.alcGetContextsDevice(ctx);
-
- if (device == null) {
- return null;
- }
-
- return device;
- }
-
- @Override
- public void createALC() {
- ALut.alutInit();
-
- /*
- // Get handle to default device.
- ALCdevice device = joalAlc.alcOpenDevice(null);
- if (device == null) {
- throw new ALException("Error opening default OpenAL device");
- }
-
- // Create audio context.
- ALCcontext context = joalAlc.alcCreateContext(device, null);
- if (context == null) {
- throw new ALException("Error creating OpenAL context");
- }
-
- // Set active context.
- if (!joalAlc.alcMakeContextCurrent(context)) {
- throw new ALException("Failed to make OpenAL context current");
- }
-
- // Check for an error.
- if (joalAlc.alcGetError(device) != com.jogamp.openal.ALC.ALC_NO_ERROR) {
- throw new ALException("Error making OpenAL context current");
- }
- */
- }
-
- @Override
- public void destroyALC() {
- /*
- ALCcontext ctx = joalAlc.alcGetCurrentContext();
-
- if (ctx == null) {
- return;
- }
-
- ALCdevice device = joalAlc.alcGetContextsDevice(ctx);
-
- if (device == null) {
- return;
- }
-
- if (!joalAlc.alcMakeContextCurrent(null)) {
- return;
- }
-
- joalAlc.alcDestroyContext(ctx);
- joalAlc.alcCloseDevice(device);
- */
-
- ALut.alutExit();
- }
-
- @Override
- public boolean isCreated() {
- return getALCDevice() != null;
- }
-
- @Override
- public String alcGetString(int parameter) {
- return joalAlc.alcGetString(getALCDevice(), parameter);
- }
-
- @Override
- public boolean alcIsExtensionPresent(String extension) {
- return joalAlc.alcIsExtensionPresent(getALCDevice(), extension);
- }
-
- @Override
- public void alcGetInteger(int param, IntBuffer buffer, int size) {
- joalAlc.alcGetIntegerv(getALCDevice(), param, size, buffer);
- }
-
- @Override
- public void alcDevicePauseSOFT() {
- }
-
- @Override
- public void alcDeviceResumeSOFT() {
- }
-}
diff --git a/jme3-jogl/src/main/java/com/jme3/audio/joal/JoalEFX.java b/jme3-jogl/src/main/java/com/jme3/audio/joal/JoalEFX.java
deleted file mode 100644
index dbaf2c4d7..000000000
--- a/jme3-jogl/src/main/java/com/jme3/audio/joal/JoalEFX.java
+++ /dev/null
@@ -1,107 +0,0 @@
-/*
- * Copyright (c) 2009-2020 jMonkeyEngine
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are
- * met:
- *
- * * Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- *
- * * Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- *
- * * Neither the name of 'jMonkeyEngine' nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
- * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
- * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
- * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
- * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
- * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
- * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
- * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
- * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
- * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-package com.jme3.audio.joal;
-
-import com.jme3.audio.openal.EFX;
-import com.jogamp.openal.ALExt;
-import com.jogamp.openal.ALFactory;
-import java.nio.IntBuffer;
-
-/**
- * Exposes EFX extension for JOAL.
- *
- * @author Kirill Vainer
- */
-public final class JoalEFX implements EFX {
-
- private final ALExt joalAlext;
-
- public JoalEFX() {
- joalAlext = ALFactory.getALExt();
- }
-
- @Override
- public void alGenAuxiliaryEffectSlots(int numSlots, IntBuffer buffers) {
- joalAlext.alGenAuxiliaryEffectSlots(numSlots, buffers);
- }
-
- @Override
- public void alGenEffects(int numEffects, IntBuffer buffers) {
- joalAlext.alGenEffects(numEffects, buffers);
- }
-
- @Override
- public void alEffecti(int effect, int param, int value) {
- joalAlext.alEffecti(effect, param, value);
- }
-
- @Override
- public void alAuxiliaryEffectSloti(int effectSlot, int param, int value) {
- joalAlext.alAuxiliaryEffectSloti(effectSlot, param, value);
- }
-
- @Override
- public void alDeleteEffects(int numEffects, IntBuffer buffers) {
- joalAlext.alDeleteEffects(numEffects, buffers);
- }
-
- @Override
- public void alDeleteAuxiliaryEffectSlots(int numEffectSlots, IntBuffer buffers) {
- joalAlext.alDeleteAuxiliaryEffectSlots(numEffectSlots, buffers);
- }
-
- @Override
- public void alGenFilters(int numFilters, IntBuffer buffers) {
- joalAlext.alGenFilters(numFilters, buffers);
- }
-
- @Override
- public void alFilteri(int filter, int param, int value) {
- joalAlext.alFilteri(filter, param, value);
- }
-
- @Override
- public void alFilterf(int filter, int param, float value) {
- joalAlext.alFilterf(filter, param, value);
- }
-
- @Override
- public void alDeleteFilters(int numFilters, IntBuffer buffers) {
- joalAlext.alDeleteFilters(numFilters, buffers);
- }
-
- @Override
- public void alEffectf(int effect, int param, float value) {
- joalAlext.alEffectf(effect, param, value);
- }
-}
diff --git a/jme3-jogl/src/main/java/com/jme3/input/jogl/NewtKeyInput.java b/jme3-jogl/src/main/java/com/jme3/input/jogl/NewtKeyInput.java
deleted file mode 100644
index 9f6e91fe0..000000000
--- a/jme3-jogl/src/main/java/com/jme3/input/jogl/NewtKeyInput.java
+++ /dev/null
@@ -1,597 +0,0 @@
-/*
- * Copyright (c) 2009-2020 jMonkeyEngine
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are
- * met:
- *
- * * Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- *
- * * Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- *
- * * Neither the name of 'jMonkeyEngine' nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
- * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
- * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
- * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
- * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
- * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
- * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
- * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
- * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
- * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-package com.jme3.input.jogl;
-
-import com.jme3.input.KeyInput;
-import com.jme3.input.RawInputListener;
-import com.jme3.input.event.KeyInputEvent;
-import com.jogamp.newt.event.KeyEvent;
-import com.jogamp.newt.event.KeyListener;
-import com.jogamp.newt.opengl.GLWindow;
-import java.util.ArrayList;
-import java.util.logging.Level;
-import java.util.logging.Logger;
-
-public class NewtKeyInput implements KeyInput, KeyListener {
-
- private static final Logger logger = Logger.getLogger(NewtKeyInput.class.getName());
-
- private final ArrayListconvertJmeCode
converts KeyInput key codes to AWT key codes.
- *
- * @param key jme KeyInput key code
- * @return awt KeyEvent key code
- */
- public static int convertJmeCode( int key ) {
- switch ( key ) {
- case KEY_ESCAPE:
- return KeyEvent.VK_ESCAPE;
- case KEY_1:
- return KeyEvent.VK_1;
- case KEY_2:
- return KeyEvent.VK_2;
- case KEY_3:
- return KeyEvent.VK_3;
- case KEY_4:
- return KeyEvent.VK_4;
- case KEY_5:
- return KeyEvent.VK_5;
- case KEY_6:
- return KeyEvent.VK_6;
- case KEY_7:
- return KeyEvent.VK_7;
- case KEY_8:
- return KeyEvent.VK_8;
- case KEY_9:
- return KeyEvent.VK_9;
- case KEY_0:
- return KeyEvent.VK_0;
- case KEY_MINUS:
- return KeyEvent.VK_MINUS;
- case KEY_EQUALS:
- return KeyEvent.VK_EQUALS;
- case KEY_BACK:
- return KeyEvent.VK_BACK_SPACE;
- case KEY_TAB:
- return KeyEvent.VK_TAB;
- case KEY_Q:
- return KeyEvent.VK_Q;
- case KEY_W:
- return KeyEvent.VK_W;
- case KEY_E:
- return KeyEvent.VK_E;
- case KEY_R:
- return KeyEvent.VK_R;
- case KEY_T:
- return KeyEvent.VK_T;
- case KEY_Y:
- return KeyEvent.VK_Y;
- case KEY_U:
- return KeyEvent.VK_U;
- case KEY_I:
- return KeyEvent.VK_I;
- case KEY_O:
- return KeyEvent.VK_O;
- case KEY_P:
- return KeyEvent.VK_P;
- case KEY_LBRACKET:
- return KeyEvent.VK_OPEN_BRACKET;
- case KEY_RBRACKET:
- return KeyEvent.VK_CLOSE_BRACKET;
- case KEY_RETURN:
- return KeyEvent.VK_ENTER;
- case KEY_LCONTROL:
- return KeyEvent.VK_CONTROL;
- case KEY_A:
- return KeyEvent.VK_A;
- case KEY_S:
- return KeyEvent.VK_S;
- case KEY_D:
- return KeyEvent.VK_D;
- case KEY_F:
- return KeyEvent.VK_F;
- case KEY_G:
- return KeyEvent.VK_G;
- case KEY_H:
- return KeyEvent.VK_H;
- case KEY_J:
- return KeyEvent.VK_J;
- case KEY_K:
- return KeyEvent.VK_K;
- case KEY_L:
- return KeyEvent.VK_L;
- case KEY_SEMICOLON:
- return KeyEvent.VK_SEMICOLON;
- case KEY_APOSTROPHE:
- return KeyEvent.VK_QUOTE;
- //case KEY_GRAVE:
- // return KeyEvent.VK_DEAD_GRAVE;
- case KEY_LSHIFT:
- return KeyEvent.VK_SHIFT;
- case KEY_BACKSLASH:
- return KeyEvent.VK_BACK_SLASH;
- case KEY_Z:
- return KeyEvent.VK_Z;
- case KEY_X:
- return KeyEvent.VK_X;
- case KEY_C:
- return KeyEvent.VK_C;
- case KEY_V:
- return KeyEvent.VK_V;
- case KEY_B:
- return KeyEvent.VK_B;
- case KEY_N:
- return KeyEvent.VK_N;
- case KEY_M:
- return KeyEvent.VK_M;
- case KEY_COMMA:
- return KeyEvent.VK_COMMA;
- case KEY_PERIOD:
- return KeyEvent.VK_PERIOD;
- case KEY_SLASH:
- return KeyEvent.VK_SLASH;
- case KEY_RSHIFT:
- return KeyEvent.VK_SHIFT;
- case KEY_MULTIPLY:
- return KeyEvent.VK_MULTIPLY;
- case KEY_SPACE:
- return KeyEvent.VK_SPACE;
- case KEY_CAPITAL:
- return KeyEvent.VK_CAPS_LOCK;
- case KEY_F1:
- return KeyEvent.VK_F1;
- case KEY_F2:
- return KeyEvent.VK_F2;
- case KEY_F3:
- return KeyEvent.VK_F3;
- case KEY_F4:
- return KeyEvent.VK_F4;
- case KEY_F5:
- return KeyEvent.VK_F5;
- case KEY_F6:
- return KeyEvent.VK_F6;
- case KEY_F7:
- return KeyEvent.VK_F7;
- case KEY_F8:
- return KeyEvent.VK_F8;
- case KEY_F9:
- return KeyEvent.VK_F9;
- case KEY_F10:
- return KeyEvent.VK_F10;
- case KEY_NUMLOCK:
- return KeyEvent.VK_NUM_LOCK;
- case KEY_SCROLL:
- return KeyEvent.VK_SCROLL_LOCK;
- case KEY_NUMPAD7:
- return KeyEvent.VK_NUMPAD7;
- case KEY_NUMPAD8:
- return KeyEvent.VK_NUMPAD8;
- case KEY_NUMPAD9:
- return KeyEvent.VK_NUMPAD9;
- case KEY_SUBTRACT:
- return KeyEvent.VK_SUBTRACT;
- case KEY_NUMPAD4:
- return KeyEvent.VK_NUMPAD4;
- case KEY_NUMPAD5:
- return KeyEvent.VK_NUMPAD5;
- case KEY_NUMPAD6:
- return KeyEvent.VK_NUMPAD6;
- case KEY_ADD:
- return KeyEvent.VK_ADD;
- case KEY_NUMPAD1:
- return KeyEvent.VK_NUMPAD1;
- case KEY_NUMPAD2:
- return KeyEvent.VK_NUMPAD2;
- case KEY_NUMPAD3:
- return KeyEvent.VK_NUMPAD3;
- case KEY_NUMPAD0:
- return KeyEvent.VK_NUMPAD0;
- case KEY_DECIMAL:
- return KeyEvent.VK_DECIMAL;
- case KEY_F11:
- return KeyEvent.VK_F11;
- case KEY_F12:
- return KeyEvent.VK_F12;
- case KEY_F13:
- return KeyEvent.VK_F13;
- case KEY_F14:
- return KeyEvent.VK_F14;
- case KEY_F15:
- return KeyEvent.VK_F15;
- //case KEY_KANA:
- // return KeyEvent.VK_KANA;
- case KEY_CONVERT:
- return KeyEvent.VK_CONVERT;
- case KEY_NOCONVERT:
- return KeyEvent.VK_NONCONVERT;
- case KEY_NUMPADEQUALS:
- return KeyEvent.VK_EQUALS;
- case KEY_CIRCUMFLEX:
- return KeyEvent.VK_CIRCUMFLEX;
- case KEY_AT:
- return KeyEvent.VK_AT;
- case KEY_COLON:
- return KeyEvent.VK_COLON;
- case KEY_UNDERLINE:
- return KeyEvent.VK_UNDERSCORE;
- case KEY_STOP:
- return KeyEvent.VK_STOP;
- case KEY_NUMPADENTER:
- return KeyEvent.VK_ENTER;
- case KEY_RCONTROL:
- return KeyEvent.VK_CONTROL;
- case KEY_NUMPADCOMMA:
- return KeyEvent.VK_COMMA;
- case KEY_DIVIDE:
- return KeyEvent.VK_DIVIDE;
- case KEY_PAUSE:
- return KeyEvent.VK_PAUSE;
- case KEY_HOME:
- return KeyEvent.VK_HOME;
- case KEY_UP:
- return KeyEvent.VK_UP;
- case KEY_PRIOR:
- return KeyEvent.VK_PAGE_UP;
- case KEY_LEFT:
- return KeyEvent.VK_LEFT;
- case KEY_RIGHT:
- return KeyEvent.VK_RIGHT;
- case KEY_END:
- return KeyEvent.VK_END;
- case KEY_DOWN:
- return KeyEvent.VK_DOWN;
- case KEY_NEXT:
- return KeyEvent.VK_PAGE_DOWN;
- case KEY_INSERT:
- return KeyEvent.VK_INSERT;
- case KEY_DELETE:
- return KeyEvent.VK_DELETE;
- case KEY_LMENU:
- return KeyEvent.VK_ALT; //todo: location left
- case KEY_RMENU:
- return KeyEvent.VK_ALT; //todo: location right
- }
- logger.log(Level.WARNING, "unsupported key:{0}", key);
- return 0x10000 + key;
- }
-
- /**
- * convertAwtKey
converts AWT key codes to KeyInput key codes.
- *
- * @param key awt KeyEvent key code
- * @return jme KeyInput key code
- */
- public static int convertNewtKey(short key) {
- switch ( key ) {
- case KeyEvent.VK_ESCAPE:
- return KEY_ESCAPE;
- case KeyEvent.VK_1:
- return KEY_1;
- case KeyEvent.VK_2:
- return KEY_2;
- case KeyEvent.VK_3:
- return KEY_3;
- case KeyEvent.VK_4:
- return KEY_4;
- case KeyEvent.VK_5:
- return KEY_5;
- case KeyEvent.VK_6:
- return KEY_6;
- case KeyEvent.VK_7:
- return KEY_7;
- case KeyEvent.VK_8:
- return KEY_8;
- case KeyEvent.VK_9:
- return KEY_9;
- case KeyEvent.VK_0:
- return KEY_0;
- case KeyEvent.VK_MINUS:
- return KEY_MINUS;
- case KeyEvent.VK_EQUALS:
- return KEY_EQUALS;
- case KeyEvent.VK_BACK_SPACE:
- return KEY_BACK;
- case KeyEvent.VK_TAB:
- return KEY_TAB;
- case KeyEvent.VK_Q:
- return KEY_Q;
- case KeyEvent.VK_W:
- return KEY_W;
- case KeyEvent.VK_E:
- return KEY_E;
- case KeyEvent.VK_R:
- return KEY_R;
- case KeyEvent.VK_T:
- return KEY_T;
- case KeyEvent.VK_Y:
- return KEY_Y;
- case KeyEvent.VK_U:
- return KEY_U;
- case KeyEvent.VK_I:
- return KEY_I;
- case KeyEvent.VK_O:
- return KEY_O;
- case KeyEvent.VK_P:
- return KEY_P;
- case KeyEvent.VK_OPEN_BRACKET:
- return KEY_LBRACKET;
- case KeyEvent.VK_CLOSE_BRACKET:
- return KEY_RBRACKET;
- case KeyEvent.VK_ENTER:
- return KEY_RETURN;
- case KeyEvent.VK_CONTROL:
- return KEY_LCONTROL;
- case KeyEvent.VK_A:
- return KEY_A;
- case KeyEvent.VK_S:
- return KEY_S;
- case KeyEvent.VK_D:
- return KEY_D;
- case KeyEvent.VK_F:
- return KEY_F;
- case KeyEvent.VK_G:
- return KEY_G;
- case KeyEvent.VK_H:
- return KEY_H;
- case KeyEvent.VK_J:
- return KEY_J;
- case KeyEvent.VK_K:
- return KEY_K;
- case KeyEvent.VK_L:
- return KEY_L;
- case KeyEvent.VK_SEMICOLON:
- return KEY_SEMICOLON;
- case KeyEvent.VK_QUOTE:
- return KEY_APOSTROPHE;
- //case KeyEvent.VK_DEAD_GRAVE:
- // return KEY_GRAVE;
- case KeyEvent.VK_SHIFT:
- return KEY_LSHIFT;
- case KeyEvent.VK_BACK_SLASH:
- return KEY_BACKSLASH;
- case KeyEvent.VK_Z:
- return KEY_Z;
- case KeyEvent.VK_X:
- return KEY_X;
- case KeyEvent.VK_C:
- return KEY_C;
- case KeyEvent.VK_V:
- return KEY_V;
- case KeyEvent.VK_B:
- return KEY_B;
- case KeyEvent.VK_N:
- return KEY_N;
- case KeyEvent.VK_M:
- return KEY_M;
- case KeyEvent.VK_COMMA:
- return KEY_COMMA;
- case KeyEvent.VK_PERIOD:
- return KEY_PERIOD;
- case KeyEvent.VK_SLASH:
- return KEY_SLASH;
- case KeyEvent.VK_MULTIPLY:
- return KEY_MULTIPLY;
- case KeyEvent.VK_SPACE:
- return KEY_SPACE;
- case KeyEvent.VK_CAPS_LOCK:
- return KEY_CAPITAL;
- case KeyEvent.VK_F1:
- return KEY_F1;
- case KeyEvent.VK_F2:
- return KEY_F2;
- case KeyEvent.VK_F3:
- return KEY_F3;
- case KeyEvent.VK_F4:
- return KEY_F4;
- case KeyEvent.VK_F5:
- return KEY_F5;
- case KeyEvent.VK_F6:
- return KEY_F6;
- case KeyEvent.VK_F7:
- return KEY_F7;
- case KeyEvent.VK_F8:
- return KEY_F8;
- case KeyEvent.VK_F9:
- return KEY_F9;
- case KeyEvent.VK_F10:
- return KEY_F10;
- case KeyEvent.VK_NUM_LOCK:
- return KEY_NUMLOCK;
- case KeyEvent.VK_SCROLL_LOCK:
- return KEY_SCROLL;
- case KeyEvent.VK_NUMPAD7:
- return KEY_NUMPAD7;
- case KeyEvent.VK_NUMPAD8:
- return KEY_NUMPAD8;
- case KeyEvent.VK_NUMPAD9:
- return KEY_NUMPAD9;
- case KeyEvent.VK_SUBTRACT:
- return KEY_SUBTRACT;
- case KeyEvent.VK_NUMPAD4:
- return KEY_NUMPAD4;
- case KeyEvent.VK_NUMPAD5:
- return KEY_NUMPAD5;
- case KeyEvent.VK_NUMPAD6:
- return KEY_NUMPAD6;
- case KeyEvent.VK_ADD:
- return KEY_ADD;
- case KeyEvent.VK_NUMPAD1:
- return KEY_NUMPAD1;
- case KeyEvent.VK_NUMPAD2:
- return KEY_NUMPAD2;
- case KeyEvent.VK_NUMPAD3:
- return KEY_NUMPAD3;
- case KeyEvent.VK_NUMPAD0:
- return KEY_NUMPAD0;
- case KeyEvent.VK_DECIMAL:
- return KEY_DECIMAL;
- case KeyEvent.VK_F11:
- return KEY_F11;
- case KeyEvent.VK_F12:
- return KEY_F12;
- case KeyEvent.VK_F13:
- return KEY_F13;
- case KeyEvent.VK_F14:
- return KEY_F14;
- case KeyEvent.VK_F15:
- return KEY_F15;
- //case KeyEvent.VK_KANA:
- // return KEY_KANA;
- case KeyEvent.VK_CONVERT:
- return KEY_CONVERT;
- case KeyEvent.VK_NONCONVERT:
- return KEY_NOCONVERT;
- case KeyEvent.VK_CIRCUMFLEX:
- return KEY_CIRCUMFLEX;
- case KeyEvent.VK_AT:
- return KEY_AT;
- case KeyEvent.VK_COLON:
- return KEY_COLON;
- case KeyEvent.VK_UNDERSCORE:
- return KEY_UNDERLINE;
- case KeyEvent.VK_STOP:
- return KEY_STOP;
- case KeyEvent.VK_DIVIDE:
- return KEY_DIVIDE;
- case KeyEvent.VK_PAUSE:
- return KEY_PAUSE;
- case KeyEvent.VK_HOME:
- return KEY_HOME;
- case KeyEvent.VK_UP:
- return KEY_UP;
- case KeyEvent.VK_PAGE_UP:
- return KEY_PRIOR;
- case KeyEvent.VK_LEFT:
- return KEY_LEFT;
- case KeyEvent.VK_RIGHT:
- return KEY_RIGHT;
- case KeyEvent.VK_END:
- return KEY_END;
- case KeyEvent.VK_DOWN:
- return KEY_DOWN;
- case KeyEvent.VK_PAGE_DOWN:
- return KEY_NEXT;
- case KeyEvent.VK_INSERT:
- return KEY_INSERT;
- case KeyEvent.VK_DELETE:
- return KEY_DELETE;
- case KeyEvent.VK_ALT:
- return KEY_LMENU; //Left vs. Right need to improve
- case KeyEvent.VK_META:
- return KEY_RCONTROL;
-
- }
- logger.log( Level.WARNING, "unsupported key:{0}", key);
- if ( key >= 0x10000 ) {
- return key - 0x10000;
- }
-
- return 0;
- }
-
-}
diff --git a/jme3-jogl/src/main/java/com/jme3/input/jogl/NewtMouseInput.java b/jme3-jogl/src/main/java/com/jme3/input/jogl/NewtMouseInput.java
deleted file mode 100644
index bb7a9aebf..000000000
--- a/jme3-jogl/src/main/java/com/jme3/input/jogl/NewtMouseInput.java
+++ /dev/null
@@ -1,327 +0,0 @@
-/*
- * Copyright (c) 2009-2012 jMonkeyEngine
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are
- * met:
- *
- * * Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- *
- * * Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- *
- * * Neither the name of 'jMonkeyEngine' nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
- * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
- * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
- * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
- * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
- * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
- * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
- * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
- * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
- * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-package com.jme3.input.jogl;
-
-import com.jme3.cursors.plugins.JmeCursor;
-import com.jme3.input.MouseInput;
-import com.jme3.input.RawInputListener;
-import com.jme3.input.event.MouseButtonEvent;
-import com.jme3.input.event.MouseMotionEvent;
-import com.jogamp.common.nio.Buffers;
-import com.jogamp.newt.Display.PointerIcon;
-import com.jogamp.newt.event.MouseEvent;
-import com.jogamp.newt.event.MouseListener;
-import com.jogamp.newt.opengl.GLWindow;
-import java.nio.ByteBuffer;
-import java.util.ArrayList;
-import java.util.logging.Logger;
-import com.jogamp.nativewindow.util.Dimension;
-import com.jogamp.nativewindow.util.DimensionImmutable;
-import com.jogamp.nativewindow.util.PixelFormat;
-import com.jogamp.nativewindow.util.PixelRectangle;
-import com.jogamp.nativewindow.util.Point;
-import com.jogamp.newt.event.WindowAdapter;
-import com.jogamp.newt.event.WindowEvent;
-
-public class NewtMouseInput implements MouseInput, MouseListener {
-
- public static int WHEEL_AMP = 40; // arbitrary... Java's mouse wheel seems to report something a lot lower than lwjgl's
-
- private static final Logger logger = Logger.getLogger(NewtMouseInput.class.getName());
-
- private boolean visible = true;
-
- private RawInputListener listener;
-
- private GLWindow component;
-
- private final ArrayList