aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSven Gothel <[email protected]>2014-04-01 16:46:29 +0200
committerSven Gothel <[email protected]>2014-04-01 16:46:29 +0200
commit6f5686696b1e9085a759774056c7be9887a9e34f (patch)
tree273eb4f75ebdcd8acc091945fb2a0ab825bb71e0
parentb935d5248aef79e2386a284b32f5888348a382d6 (diff)
parentd6d9db6334193ec1cf3c1f00b2a9e154a15d779f (diff)
Merge branch 'master' into graph-wip
-rw-r--r--src/jogl/classes/com/jogamp/opengl/GLRendererQuirks.java1
-rw-r--r--src/jogl/classes/jogamp/opengl/GLContextImpl.java2
-rw-r--r--src/jogl/classes/jogamp/opengl/windows/wgl/WindowsWGLContext.java2
-rw-r--r--src/jogl/classes/jogamp/opengl/x11/glx/X11GLXContext.java4
-rw-r--r--src/nativewindow/classes/com/jogamp/nativewindow/awt/AWTGraphicsDevice.java4
-rw-r--r--src/nativewindow/classes/com/jogamp/nativewindow/egl/EGLGraphicsDevice.java2
-rw-r--r--src/nativewindow/classes/com/jogamp/nativewindow/macosx/MacOSXGraphicsDevice.java2
-rw-r--r--src/nativewindow/classes/com/jogamp/nativewindow/windows/WindowsGraphicsDevice.java4
-rw-r--r--src/nativewindow/classes/com/jogamp/nativewindow/x11/X11GraphicsDevice.java8
-rw-r--r--src/nativewindow/classes/javax/media/nativewindow/DefaultGraphicsDevice.java11
10 files changed, 19 insertions, 21 deletions
diff --git a/src/jogl/classes/com/jogamp/opengl/GLRendererQuirks.java b/src/jogl/classes/com/jogamp/opengl/GLRendererQuirks.java
index cc709c96b..9c9f4e3d6 100644
--- a/src/jogl/classes/com/jogamp/opengl/GLRendererQuirks.java
+++ b/src/jogl/classes/com/jogamp/opengl/GLRendererQuirks.java
@@ -31,7 +31,6 @@ import java.util.IdentityHashMap;
import javax.media.nativewindow.AbstractGraphicsDevice;
import javax.media.opengl.GLCapabilitiesImmutable;
-import javax.media.opengl.GLDrawableFactory;
import com.jogamp.common.os.Platform;
diff --git a/src/jogl/classes/jogamp/opengl/GLContextImpl.java b/src/jogl/classes/jogamp/opengl/GLContextImpl.java
index 04ecba262..d2f69029e 100644
--- a/src/jogl/classes/jogamp/opengl/GLContextImpl.java
+++ b/src/jogl/classes/jogamp/opengl/GLContextImpl.java
@@ -1351,7 +1351,7 @@ public abstract class GLContextImpl extends GLContext {
* <li>match ES major versions</li>
* </ul>, otherwise method aborts and returns <code>false</code>.<br>
* if <code>false</code> no version check is performed.
- * @param withinGLVersionsMapping if <code>true</code> GL version mapping is in process, i.e. quering avail versions.
+ * @param withinGLVersionsMapping if <code>true</code> GL version mapping is in process, i.e. querying avail versions.
* Otherwise normal user context creation.
* @return returns <code>true</code> if successful, otherwise <code>false</code>.<br>
* If <code>strictMatch</code> is <code>false</code> method shall always return <code>true</code> or throw an exception.
diff --git a/src/jogl/classes/jogamp/opengl/windows/wgl/WindowsWGLContext.java b/src/jogl/classes/jogamp/opengl/windows/wgl/WindowsWGLContext.java
index b214252c1..0df986f77 100644
--- a/src/jogl/classes/jogamp/opengl/windows/wgl/WindowsWGLContext.java
+++ b/src/jogl/classes/jogamp/opengl/windows/wgl/WindowsWGLContext.java
@@ -314,7 +314,7 @@ public class WindowsWGLContext extends GLContextImpl {
if ( !WGL.wglMakeCurrent(drawable.getHandle(), temp_ctx) ) {
throw new GLException("Error making temp context current: 0x" + toHexString(temp_ctx) + ", werr: "+GDI.GetLastError());
}
- if( !setGLFunctionAvailability(true, 0, 0, CTX_PROFILE_COMPAT, false /* strictMatch */, false /* withinGLVersionsMapping */) ) { // use GL_VERSION
+ if( !setGLFunctionAvailability(true, 0, 0, CTX_PROFILE_COMPAT, false /* strictMatch */, null == sharedContext /* withinGLVersionsMapping */) ) { // use GL_VERSION
throw new InternalError("setGLFunctionAvailability !strictMatch failed");
}
WGL.wglMakeCurrent(0, 0); // release temp context
diff --git a/src/jogl/classes/jogamp/opengl/x11/glx/X11GLXContext.java b/src/jogl/classes/jogamp/opengl/x11/glx/X11GLXContext.java
index 94620c4fc..57d39d533 100644
--- a/src/jogl/classes/jogamp/opengl/x11/glx/X11GLXContext.java
+++ b/src/jogl/classes/jogamp/opengl/x11/glx/X11GLXContext.java
@@ -313,7 +313,7 @@ public class X11GLXContext extends GLContextImpl {
if ( !glXMakeContextCurrent(display, drawable.getHandle(), drawableRead.getHandle(), contextHandle) ) {
throw new GLException(getThreadName()+": Error making temp context(0) current: display "+toHexString(display)+", context "+toHexString(contextHandle)+", drawable "+drawable);
}
- if( !setGLFunctionAvailability(true, 0, 0, CTX_PROFILE_COMPAT, false /* strictMatch */, false /* withinGLVersionsMapping */) ) { // use GL_VERSION
+ if( !setGLFunctionAvailability(true, 0, 0, CTX_PROFILE_COMPAT, false /* strictMatch */, null == sharedContext /* withinGLVersionsMapping */) ) { // use GL_VERSION
throw new InternalError("setGLFunctionAvailability !strictMatch failed");
}
isDirect = GLX.glXIsDirect(display, contextHandle);
@@ -345,7 +345,7 @@ public class X11GLXContext extends GLContextImpl {
if ( !glXMakeContextCurrent(display, drawable.getHandle(), drawableRead.getHandle(), temp_ctx) ) {
throw new GLException(getThreadName()+": Error making temp context(1) current: display "+toHexString(display)+", context "+toHexString(temp_ctx)+", drawable "+drawable);
}
- setGLFunctionAvailability(true, 0, 0, CTX_PROFILE_COMPAT, false /* strictMatch */, false /* withinGLVersionsMapping */); // use GL_VERSION
+ setGLFunctionAvailability(true, 0, 0, CTX_PROFILE_COMPAT, false /* strictMatch */, null == sharedContext /* withinGLVersionsMapping */); // use GL_VERSION
glXMakeContextCurrent(display, 0, 0, 0); // release temp context
if( !createContextARBTried ) {
// is*Available calls are valid since setGLFunctionAvailability(..) was called
diff --git a/src/nativewindow/classes/com/jogamp/nativewindow/awt/AWTGraphicsDevice.java b/src/nativewindow/classes/com/jogamp/nativewindow/awt/AWTGraphicsDevice.java
index a7fa53577..d72eabb02 100644
--- a/src/nativewindow/classes/com/jogamp/nativewindow/awt/AWTGraphicsDevice.java
+++ b/src/nativewindow/classes/com/jogamp/nativewindow/awt/AWTGraphicsDevice.java
@@ -48,9 +48,9 @@ import javax.media.nativewindow.AbstractGraphicsDevice;
/** A wrapper for an AWT GraphicsDevice allowing it to be
handled in a toolkit-independent manner. */
public class AWTGraphicsDevice extends DefaultGraphicsDevice implements Cloneable {
- private GraphicsDevice device;
+ private final GraphicsDevice device;
- public AWTGraphicsDevice(GraphicsDevice device, int unitID) {
+ public AWTGraphicsDevice(final GraphicsDevice device, final int unitID) {
super(NativeWindowFactory.TYPE_AWT, device.getIDstring(), unitID);
this.device = device;
}
diff --git a/src/nativewindow/classes/com/jogamp/nativewindow/egl/EGLGraphicsDevice.java b/src/nativewindow/classes/com/jogamp/nativewindow/egl/EGLGraphicsDevice.java
index 6dc52a702..ffcbb8626 100644
--- a/src/nativewindow/classes/com/jogamp/nativewindow/egl/EGLGraphicsDevice.java
+++ b/src/nativewindow/classes/com/jogamp/nativewindow/egl/EGLGraphicsDevice.java
@@ -73,7 +73,7 @@ public class EGLGraphicsDevice extends DefaultGraphicsDevice implements Cloneabl
this.eglLifecycleCallback = null;
}
- public EGLGraphicsDevice(long nativeDisplayID, long eglDisplay, String connection, int unitID, EGLDisplayLifecycleCallback eglLifecycleCallback) {
+ public EGLGraphicsDevice(final long nativeDisplayID, final long eglDisplay, final String connection, final int unitID, final EGLDisplayLifecycleCallback eglLifecycleCallback) {
super(NativeWindowFactory.TYPE_EGL, connection, unitID, eglDisplay);
this.nativeDisplayID[0] = nativeDisplayID;
this.eglLifecycleCallback = eglLifecycleCallback;
diff --git a/src/nativewindow/classes/com/jogamp/nativewindow/macosx/MacOSXGraphicsDevice.java b/src/nativewindow/classes/com/jogamp/nativewindow/macosx/MacOSXGraphicsDevice.java
index 99ca006fa..ff149447e 100644
--- a/src/nativewindow/classes/com/jogamp/nativewindow/macosx/MacOSXGraphicsDevice.java
+++ b/src/nativewindow/classes/com/jogamp/nativewindow/macosx/MacOSXGraphicsDevice.java
@@ -39,7 +39,7 @@ import javax.media.nativewindow.*;
public class MacOSXGraphicsDevice extends DefaultGraphicsDevice implements Cloneable {
/** Constructs a new MacOSXGraphicsDevice */
- public MacOSXGraphicsDevice(int unitID) {
+ public MacOSXGraphicsDevice(final int unitID) {
super(NativeWindowFactory.TYPE_MACOSX, AbstractGraphicsDevice.DEFAULT_CONNECTION, unitID);
}
diff --git a/src/nativewindow/classes/com/jogamp/nativewindow/windows/WindowsGraphicsDevice.java b/src/nativewindow/classes/com/jogamp/nativewindow/windows/WindowsGraphicsDevice.java
index 643982715..ef0cbddd7 100644
--- a/src/nativewindow/classes/com/jogamp/nativewindow/windows/WindowsGraphicsDevice.java
+++ b/src/nativewindow/classes/com/jogamp/nativewindow/windows/WindowsGraphicsDevice.java
@@ -39,11 +39,11 @@ import javax.media.nativewindow.*;
*/
public class WindowsGraphicsDevice extends DefaultGraphicsDevice implements Cloneable {
/** Constructs a new WindowsGraphicsDevice */
- public WindowsGraphicsDevice(int unitID) {
+ public WindowsGraphicsDevice(final int unitID) {
this(AbstractGraphicsDevice.DEFAULT_CONNECTION, unitID);
}
- public WindowsGraphicsDevice(String connection, int unitID) {
+ public WindowsGraphicsDevice(final String connection, final int unitID) {
super(NativeWindowFactory.TYPE_WINDOWS, connection, unitID);
}
diff --git a/src/nativewindow/classes/com/jogamp/nativewindow/x11/X11GraphicsDevice.java b/src/nativewindow/classes/com/jogamp/nativewindow/x11/X11GraphicsDevice.java
index 863e53bde..633b9eaf0 100644
--- a/src/nativewindow/classes/com/jogamp/nativewindow/x11/X11GraphicsDevice.java
+++ b/src/nativewindow/classes/com/jogamp/nativewindow/x11/X11GraphicsDevice.java
@@ -54,7 +54,7 @@ public class X11GraphicsDevice extends DefaultGraphicsDevice implements Cloneabl
* This constructor exist to setup a default device connection.
* @see DefaultGraphicsDevice#DefaultGraphicsDevice(String, String, int)
*/
- public X11GraphicsDevice(String connection, int unitID) {
+ public X11GraphicsDevice(final String connection, final int unitID) {
super(NativeWindowFactory.TYPE_X11, connection, unitID);
handleOwner = false;
isXineramaEnabled = false;
@@ -64,7 +64,7 @@ public class X11GraphicsDevice extends DefaultGraphicsDevice implements Cloneabl
* {@link javax.media.nativewindow.ToolkitLock} via {@link NativeWindowFactory#getDefaultToolkitLock(String, long)}.
* @see DefaultGraphicsDevice#DefaultGraphicsDevice(String, String, int, long)
*/
- public X11GraphicsDevice(long display, int unitID, boolean owner) {
+ public X11GraphicsDevice(final long display, final int unitID, final boolean owner) {
this(display, unitID, NativeWindowFactory.getDefaultToolkitLock(NativeWindowFactory.TYPE_X11, display), owner);
}
@@ -73,7 +73,7 @@ public class X11GraphicsDevice extends DefaultGraphicsDevice implements Cloneabl
* @param locker custom {@link javax.media.nativewindow.ToolkitLock}, eg to force null locking w/ private connection
* @see DefaultGraphicsDevice#DefaultGraphicsDevice(String, String, int, long, ToolkitLock)
*/
- public X11GraphicsDevice(long display, int unitID, ToolkitLock locker, boolean owner) {
+ public X11GraphicsDevice(final long display, final int unitID, final ToolkitLock locker, final boolean owner) {
super(NativeWindowFactory.TYPE_X11, X11Lib.XDisplayString(display), unitID, display, locker);
if(0==display) {
throw new NativeWindowException("null display");
@@ -91,7 +91,7 @@ public class X11GraphicsDevice extends DefaultGraphicsDevice implements Cloneabl
* @param locker custom {@link javax.media.nativewindow.ToolkitLock}, eg to force null locking w/ private connection
* @see DefaultGraphicsDevice#DefaultGraphicsDevice(String, String, int, long, ToolkitLock)
*/
- public X11GraphicsDevice(String displayConnection, int unitID, ToolkitLock locker) {
+ public X11GraphicsDevice(final String displayConnection, final int unitID, final ToolkitLock locker) {
super(NativeWindowFactory.TYPE_X11, displayConnection, unitID, 0, locker);
handleOwner = true;
open();
diff --git a/src/nativewindow/classes/javax/media/nativewindow/DefaultGraphicsDevice.java b/src/nativewindow/classes/javax/media/nativewindow/DefaultGraphicsDevice.java
index 15ff2b1ac..f733f91de 100644
--- a/src/nativewindow/classes/javax/media/nativewindow/DefaultGraphicsDevice.java
+++ b/src/nativewindow/classes/javax/media/nativewindow/DefaultGraphicsDevice.java
@@ -49,7 +49,7 @@ public class DefaultGraphicsDevice implements Cloneable, AbstractGraphicsDevice
* gathered via {@link NativeWindowFactory#getDefaultToolkitLock(String)}.
* @param type
*/
- public DefaultGraphicsDevice(String type, String connection, int unitID) {
+ public DefaultGraphicsDevice(final String type, final String connection, final int unitID) {
this(type, connection, unitID, 0, NativeWindowFactory.getDefaultToolkitLock(type));
}
@@ -59,7 +59,7 @@ public class DefaultGraphicsDevice implements Cloneable, AbstractGraphicsDevice
* @param type
* @param handle
*/
- public DefaultGraphicsDevice(String type, String connection, int unitID, long handle) {
+ public DefaultGraphicsDevice(final String type, final String connection, final int unitID, final long handle) {
this(type, connection, unitID, handle, NativeWindowFactory.getDefaultToolkitLock(type, handle));
}
@@ -69,7 +69,7 @@ public class DefaultGraphicsDevice implements Cloneable, AbstractGraphicsDevice
* @param handle
* @param locker if null, a non blocking <i>null</i> lock is used.
*/
- public DefaultGraphicsDevice(String type, String connection, int unitID, long handle, ToolkitLock locker) {
+ public DefaultGraphicsDevice(final String type, final String connection, final int unitID, final long handle, final ToolkitLock locker) {
this.type = type;
this.connection = connection;
this.unitID = unitID;
@@ -247,8 +247,7 @@ public class DefaultGraphicsDevice implements Cloneable, AbstractGraphicsDevice
* Returns a unique String object using {@link String#intern()} for the given arguments,
* which object reference itself can be used as a key.
*/
- private static String getUniqueID(String type, String connection, int unitID) {
- final String r = (type + separator + connection + separator + unitID).intern();
- return r.intern();
+ private static String getUniqueID(final String type, final String connection, final int unitID) {
+ return (type + separator + connection + separator + unitID).intern();
}
}