From 556d92b63555a085b25e32b1cd55afce24edd07a Mon Sep 17 00:00:00 2001
From: Sven Gothel
The default implementation of the {@link
@@ -89,7 +93,7 @@ public class DefaultGLCapabilitiesChooser implements GLCapabilitiesChooser {
static {
Debug.initSingleton();
- DEBUG = Debug.isPropertyDefined("jogl.debug.CapabilitiesChooser", true);
+ DEBUG = PropertyAccess.isPropertyDefined("jogl.debug.CapabilitiesChooser", true);
}
private final static int NO_SCORE = -9999999;
@@ -142,7 +146,7 @@ public class DefaultGLCapabilitiesChooser implements GLCapabilitiesChooser {
}
// Create score array
- int[] scores = new int[availnum];
+ final int[] scores = new int[availnum];
for (int i = 0; i < scores.length; i++) {
scores[i] = NO_SCORE;
@@ -218,13 +222,13 @@ public class DefaultGLCapabilitiesChooser implements GLCapabilitiesChooser {
boolean gotHW = false;
int maxAbsoluteHWScore = 0;
for (int i = 0; i < availnum; i++) {
- int score = scores[i];
+ final int score = scores[i];
if (score == NO_SCORE) {
continue;
}
final GLCapabilitiesImmutable cur = (GLCapabilitiesImmutable) available.get(i);
if (cur.getHardwareAccelerated()) {
- int absScore = Math.abs(score);
+ final int absScore = Math.abs(score);
if (!gotHW ||
(absScore > maxAbsoluteHWScore)) {
gotHW = true;
@@ -265,7 +269,7 @@ public class DefaultGLCapabilitiesChooser implements GLCapabilitiesChooser {
int scoreClosestToZero = NO_SCORE;
int chosenIndex = -1;
for (int i = 0; i < availnum; i++) {
- int score = scores[i];
+ final int score = scores[i];
if (score == NO_SCORE) {
continue;
}
@@ -289,7 +293,7 @@ public class DefaultGLCapabilitiesChooser implements GLCapabilitiesChooser {
return chosenIndex;
}
- private static int sign(int score) {
+ private static int sign(final int score) {
if (score < 0) {
return -1;
}
diff --git a/src/jogl/classes/javax/media/opengl/GLCapabilities.java b/src/jogl/classes/javax/media/opengl/GLCapabilities.java
index 4dafe5262..0d65d35cb 100644
--- a/src/jogl/classes/javax/media/opengl/GLCapabilities.java
+++ b/src/jogl/classes/javax/media/opengl/GLCapabilities.java
@@ -80,7 +80,7 @@ public class GLCapabilities extends Capabilities implements Cloneable, GLCapabil
* @param glp GLProfile, or null for the default GLProfile
* @throws GLException if no profile is given and no default profile is available for the default device.
*/
- public GLCapabilities(GLProfile glp) throws GLException {
+ public GLCapabilities(final GLProfile glp) throws GLException {
glProfile = (null!=glp)?glp:GLProfile.getDefault(GLProfile.getDefaultDevice());
}
@@ -93,7 +93,7 @@ public class GLCapabilities extends Capabilities implements Cloneable, GLCapabil
public Object clone() {
try {
return super.clone();
- } catch (RuntimeException e) {
+ } catch (final RuntimeException e) {
throw new GLException(e);
}
}
@@ -103,7 +103,7 @@ public class GLCapabilities extends Capabilities implements Cloneable, GLCapabil
* from source
into this instance.
* @return this instance
*/
- public GLCapabilities copyFrom(GLCapabilitiesImmutable source) {
+ public GLCapabilities copyFrom(final GLCapabilitiesImmutable source) {
super.copyFrom(source);
glProfile = source.getGLProfile();
isPBuffer = source.isPBuffer();
@@ -145,12 +145,12 @@ public class GLCapabilities extends Capabilities implements Cloneable, GLCapabil
}
@Override
- public boolean equals(Object obj) {
+ public boolean equals(final Object obj) {
if(this == obj) { return true; }
if(!(obj instanceof GLCapabilitiesImmutable)) {
return false;
}
- GLCapabilitiesImmutable other = (GLCapabilitiesImmutable)obj;
+ final GLCapabilitiesImmutable other = (GLCapabilitiesImmutable)obj;
boolean res = super.equals(obj) &&
other.getGLProfile()==glProfile &&
other.isPBuffer()==isPBuffer &&
@@ -176,7 +176,7 @@ public class GLCapabilities extends Capabilities implements Cloneable, GLCapabil
@Override
public int compareTo(final CapabilitiesImmutable o) {
if ( ! ( o instanceof GLCapabilitiesImmutable ) ) {
- Class> c = (null != o) ? o.getClass() : null ;
+ final Class> c = (null != o) ? o.getClass() : null ;
throw new ClassCastException("Not a GLCapabilitiesImmutable object, but " + c);
}
final GLCapabilitiesImmutable caps = (GLCapabilitiesImmutable) o;
@@ -235,7 +235,7 @@ public class GLCapabilities extends Capabilities implements Cloneable, GLCapabil
}
/** Sets the GL profile you desire */
- public void setGLProfile(GLProfile profile) {
+ public void setGLProfile(final GLProfile profile) {
glProfile=profile;
}
@@ -256,7 +256,7 @@ public class GLCapabilities extends Capabilities implements Cloneable, GLCapabil
* Requesting offscreen pbuffer mode disables the offscreen auto selection.
*
null
*/
- protected static Integer getAvailableGLVersion(AbstractGraphicsDevice device, int reqMajor, int reqProfile) {
+ protected static Integer getAvailableGLVersion(final AbstractGraphicsDevice device, final int reqMajor, final int reqProfile) {
final String objectKey = getDeviceVersionAvailableKey(device, reqMajor, reqProfile);
Integer val;
synchronized(deviceVersionAvailable) {
@@ -1668,8 +1668,8 @@ public abstract class GLContext {
* @param minor if not null, returns the used minor version
* @param ctp if not null, returns the used context profile
*/
- protected static boolean getAvailableGLVersion(AbstractGraphicsDevice device, int reqMajor, int reqProfile,
- int[] major, int minor[], int ctp[]) {
+ protected static boolean getAvailableGLVersion(final AbstractGraphicsDevice device, final int reqMajor, final int reqProfile,
+ final int[] major, final int minor[], final int ctp[]) {
final Integer valI = getAvailableGLVersion(device, reqMajor, reqProfile);
if(null==valI) {
@@ -1694,7 +1694,7 @@ public abstract class GLContext {
* returns the highest GLProfile string regarding the implementation version and context profile bits.
* @throws GLException if version and context profile bits could not be mapped to a GLProfile
*/
- protected static String getGLProfile(int major, int minor, int ctp)
+ protected static String getGLProfile(final int major, final int minor, final int ctp)
throws GLException {
if(0 != ( CTX_PROFILE_COMPAT & ctp )) {
if(major >= 4) { return GLProfile.GL4bc; }
@@ -1714,7 +1714,7 @@ public abstract class GLContext {
/**
* Returns the GLProfile's major version number at reqMajorCTP[0] and it's context property (CTP) at reqMajorCTP[1] for availability mapping request.
*/
- protected static final void getRequestMajorAndCompat(final GLProfile glp, int[/*2*/] reqMajorCTP) {
+ protected static final void getRequestMajorAndCompat(final GLProfile glp, final int[/*2*/] reqMajorCTP) {
final GLProfile glpImpl = glp.getImpl();
if( glpImpl.isGL4() ) {
reqMajorCTP[0]=4;
@@ -1743,9 +1743,9 @@ public abstract class GLContext {
final int[] reqMajorCTP = new int[] { 0, 0 };
getRequestMajorAndCompat(glp, reqMajorCTP);
- int _major[] = { 0 };
- int _minor[] = { 0 };
- int _ctp[] = { 0 };
+ final int _major[] = { 0 };
+ final int _minor[] = { 0 };
+ final int _ctp[] = { 0 };
if( GLContext.getAvailableGLVersion(device, reqMajorCTP[0], reqMajorCTP[1], _major, _minor, _ctp)) {
return _ctp[0];
}
@@ -1758,7 +1758,7 @@ public abstract class GLContext {
* @param profile Key Value either {@link #CTX_PROFILE_COMPAT}, {@link #CTX_PROFILE_CORE} or {@link #CTX_PROFILE_ES}
* @return the highest GLProfile for the device regarding availability, version and profile bits.
*/
- protected static GLProfile getAvailableGLProfile(AbstractGraphicsDevice device, int reqMajor, int reqProfile)
+ protected static GLProfile getAvailableGLProfile(final AbstractGraphicsDevice device, final int reqMajor, final int reqProfile)
throws GLException {
final String glpName = getAvailableGLProfileName(device, reqMajor, reqProfile);
return null != glpName ? GLProfile.get(device, glpName) : null;
@@ -1770,11 +1770,11 @@ public abstract class GLContext {
* @param profile Key Value either {@link #CTX_PROFILE_COMPAT}, {@link #CTX_PROFILE_CORE} or {@link #CTX_PROFILE_ES}
* @return the highest GLProfile name for the device regarding availability, version and profile bits.
*/
- /* package */ static String getAvailableGLProfileName(AbstractGraphicsDevice device, int reqMajor, int reqProfile)
+ /* package */ static String getAvailableGLProfileName(final AbstractGraphicsDevice device, final int reqMajor, final int reqProfile)
throws GLException {
- int major[] = { 0 };
- int minor[] = { 0 };
- int ctp[] = { 0 };
+ final int major[] = { 0 };
+ final int minor[] = { 0 };
+ final int ctp[] = { 0 };
if(GLContext.getAvailableGLVersion(device, reqMajor, reqProfile, major, minor, ctp)) {
return GLContext.getGLProfile(major[0], minor[0], ctp[0]);
}
@@ -1786,10 +1786,10 @@ public abstract class GLContext {
* @param major Key Value either 1, 2, 3 or 4
* @param profile Key Value either {@link #CTX_PROFILE_COMPAT}, {@link #CTX_PROFILE_CORE} or {@link #CTX_PROFILE_ES}
*/
- protected static String getAvailableGLVersionAsString(AbstractGraphicsDevice device, int major, int profile) {
- int _major[] = { 0 };
- int _minor[] = { 0 };
- int _ctp[] = { 0 };
+ protected static String getAvailableGLVersionAsString(final AbstractGraphicsDevice device, final int major, final int profile) {
+ final int _major[] = { 0 };
+ final int _minor[] = { 0 };
+ final int _ctp[] = { 0 };
if(getAvailableGLVersion(device, major, profile, _major, _minor, _ctp)) {
return getGLVersion(_major[0], _minor[0], _ctp[0], null);
}
@@ -1809,7 +1809,7 @@ public abstract class GLContext {
* @param glp {@link GLProfile} to check for FBO capabilities
* @see GLContext#hasBasicFBOSupport()
*/
- public static final boolean isFBOAvailable(AbstractGraphicsDevice device, GLProfile glp) {
+ public static final boolean isFBOAvailable(final AbstractGraphicsDevice device, final GLProfile glp) {
return 0 != ( CTX_IMPL_FBO & getAvailableContextProperties(device, glp) );
}
@@ -1818,7 +1818,7 @@ public abstract class GLContext {
* @see GLContext#isHardwareRasterizer()
* @see GLProfile#isHardwareRasterizer()
*/
- public static final int isHardwareRasterizer(AbstractGraphicsDevice device, GLProfile glp) {
+ public static final int isHardwareRasterizer(final AbstractGraphicsDevice device, final GLProfile glp) {
final int r;
final int ctp = getAvailableContextProperties(device, glp);
if(0 == ctp) {
@@ -1838,8 +1838,8 @@ public abstract class GLContext {
* @param isHardware return value of one boolean, whether the profile is a hardware rasterizer or not
* @return true if the requested GL version is available regardless of a software or hardware rasterizer, otherwise false.
*/
- protected static boolean isGLVersionAvailable(AbstractGraphicsDevice device, int reqMajor, int reqProfile, boolean isHardware[]) {
- Integer valI = getAvailableGLVersion(device, reqMajor, reqProfile);
+ protected static boolean isGLVersionAvailable(final AbstractGraphicsDevice device, final int reqMajor, final int reqProfile, final boolean isHardware[]) {
+ final Integer valI = getAvailableGLVersion(device, reqMajor, reqProfile);
if(null==valI) {
return false;
}
@@ -1847,15 +1847,15 @@ public abstract class GLContext {
return true;
}
- public static boolean isGLES1Available(AbstractGraphicsDevice device, boolean isHardware[]) {
+ public static boolean isGLES1Available(final AbstractGraphicsDevice device, final boolean isHardware[]) {
return isGLVersionAvailable(device, 1, GLContext.CTX_PROFILE_ES, isHardware);
}
- public static boolean isGLES2Available(AbstractGraphicsDevice device, boolean isHardware[]) {
+ public static boolean isGLES2Available(final AbstractGraphicsDevice device, final boolean isHardware[]) {
return isGLVersionAvailable(device, 2, GLContext.CTX_PROFILE_ES, isHardware);
}
- public static boolean isGLES3Available(AbstractGraphicsDevice device, boolean isHardware[]) {
+ public static boolean isGLES3Available(final AbstractGraphicsDevice device, final boolean isHardware[]) {
return isGLVersionAvailable(device, 3, GLContext.CTX_PROFILE_ES, isHardware);
}
@@ -1867,10 +1867,10 @@ public abstract class GLContext {
* Includes [ GL ≥ 4.3, GL ≥ 3.1 w/ GL_ARB_ES3_compatibility and GLES3 ]
*
*/
- public static final boolean isGLES3CompatibleAvailable(AbstractGraphicsDevice device) {
- int major[] = { 0 };
- int minor[] = { 0 };
- int ctp[] = { 0 };
+ public static final boolean isGLES3CompatibleAvailable(final AbstractGraphicsDevice device) {
+ final int major[] = { 0 };
+ final int minor[] = { 0 };
+ final int ctp[] = { 0 };
boolean ok;
ok = GLContext.getAvailableGLVersion(device, 3, GLContext.CTX_PROFILE_ES, major, minor, ctp);
@@ -1883,29 +1883,29 @@ public abstract class GLContext {
return 0 != ( ctp[0] & CTX_IMPL_ES3_COMPAT );
}
- public static boolean isGL4bcAvailable(AbstractGraphicsDevice device, boolean isHardware[]) {
+ public static boolean isGL4bcAvailable(final AbstractGraphicsDevice device, final boolean isHardware[]) {
return isGLVersionAvailable(device, 4, CTX_PROFILE_COMPAT, isHardware);
}
- public static boolean isGL4Available(AbstractGraphicsDevice device, boolean isHardware[]) {
+ public static boolean isGL4Available(final AbstractGraphicsDevice device, final boolean isHardware[]) {
return isGLVersionAvailable(device, 4, CTX_PROFILE_CORE, isHardware);
}
- public static boolean isGL3bcAvailable(AbstractGraphicsDevice device, boolean isHardware[]) {
+ public static boolean isGL3bcAvailable(final AbstractGraphicsDevice device, final boolean isHardware[]) {
return isGLVersionAvailable(device, 3, CTX_PROFILE_COMPAT, isHardware);
}
- public static boolean isGL3Available(AbstractGraphicsDevice device, boolean isHardware[]) {
+ public static boolean isGL3Available(final AbstractGraphicsDevice device, final boolean isHardware[]) {
return isGLVersionAvailable(device, 3, CTX_PROFILE_CORE, isHardware);
}
- public static boolean isGL2Available(AbstractGraphicsDevice device, boolean isHardware[]) {
+ public static boolean isGL2Available(final AbstractGraphicsDevice device, final boolean isHardware[]) {
return isGLVersionAvailable(device, 2, CTX_PROFILE_COMPAT, isHardware);
}
- protected static String getGLVersion(int major, int minor, int ctp, String gl_version) {
+ protected static String getGLVersion(final int major, final int minor, final int ctp, final String gl_version) {
boolean needColon = false;
- StringBuilder sb = new StringBuilder();
+ final StringBuilder sb = new StringBuilder();
sb.append(major);
sb.append(".");
sb.append(minor);
@@ -1937,15 +1937,15 @@ public abstract class GLContext {
// internal string utils
//
- protected static String toHexString(int hex) {
+ protected static String toHexString(final int hex) {
return "0x" + Integer.toHexString(hex);
}
- protected static String toHexString(long hex) {
+ protected static String toHexString(final long hex) {
return "0x" + Long.toHexString(hex);
}
- private static boolean appendString(StringBuilder sb, String string, boolean needColon, boolean condition) {
+ private static boolean appendString(final StringBuilder sb, final String string, boolean needColon, final boolean condition) {
if(condition) {
if(needColon) {
sb.append(", ");
diff --git a/src/jogl/classes/javax/media/opengl/GLDebugMessage.java b/src/jogl/classes/javax/media/opengl/GLDebugMessage.java
index acb33b058..325345012 100644
--- a/src/jogl/classes/javax/media/opengl/GLDebugMessage.java
+++ b/src/jogl/classes/javax/media/opengl/GLDebugMessage.java
@@ -51,7 +51,7 @@ public class GLDebugMessage {
* @param dbgSeverity The ARB severity level
* @param dbgMsg The debug message
*/
- public GLDebugMessage(GLContext source, long when, int dbgSource, int dbgType, int dbgId, int dbgSeverity, String dbgMsg) {
+ public GLDebugMessage(final GLContext source, final long when, final int dbgSource, final int dbgType, final int dbgId, final int dbgSeverity, final String dbgMsg) {
this.source = source;
this.when = when;
this.dbgSource = dbgSource;
@@ -71,14 +71,14 @@ public class GLDebugMessage {
* @param dbgMsg
* @return
*/
- public static GLDebugMessage translateAMDEvent(GLContext source, long when, int dbgId, int amdDbgCategory, int dbgSeverity, String dbgMsg) {
+ public static GLDebugMessage translateAMDEvent(final GLContext source, final long when, final int dbgId, final int amdDbgCategory, final int dbgSeverity, final String dbgMsg) {
int dbgSource, dbgType;
// AMD category == ARB source/type
switch(amdDbgCategory) {
case GL2GL3.GL_DEBUG_CATEGORY_API_ERROR_AMD:
- dbgSource = GL2GL3.GL_DEBUG_SOURCE_API;
- dbgType = GL2GL3.GL_DEBUG_TYPE_ERROR;
+ dbgSource = GL2ES2.GL_DEBUG_SOURCE_API;
+ dbgType = GL2ES2.GL_DEBUG_TYPE_ERROR;
break;
//
@@ -86,18 +86,18 @@ public class GLDebugMessage {
//
case GL2GL3.GL_DEBUG_CATEGORY_WINDOW_SYSTEM_AMD:
- dbgSource = GL2GL3.GL_DEBUG_SOURCE_WINDOW_SYSTEM;
- dbgType = GL2GL3.GL_DEBUG_TYPE_OTHER;
+ dbgSource = GL2ES2.GL_DEBUG_SOURCE_WINDOW_SYSTEM;
+ dbgType = GL2ES2.GL_DEBUG_TYPE_OTHER;
break;
case GL2GL3.GL_DEBUG_CATEGORY_SHADER_COMPILER_AMD:
- dbgSource = GL2GL3.GL_DEBUG_SOURCE_SHADER_COMPILER;
- dbgType = GL2GL3.GL_DEBUG_TYPE_OTHER;
+ dbgSource = GL2ES2.GL_DEBUG_SOURCE_SHADER_COMPILER;
+ dbgType = GL2ES2.GL_DEBUG_TYPE_OTHER;
break;
case GL2GL3.GL_DEBUG_CATEGORY_APPLICATION_AMD:
- dbgSource = GL2GL3.GL_DEBUG_SOURCE_APPLICATION;
- dbgType = GL2GL3.GL_DEBUG_TYPE_OTHER;
+ dbgSource = GL2ES2.GL_DEBUG_SOURCE_APPLICATION;
+ dbgType = GL2ES2.GL_DEBUG_TYPE_OTHER;
break;
@@ -106,49 +106,49 @@ public class GLDebugMessage {
//
case GL2GL3.GL_DEBUG_CATEGORY_DEPRECATION_AMD:
- dbgSource = GL2GL3.GL_DEBUG_SOURCE_OTHER;
- dbgType = GL2GL3.GL_DEBUG_TYPE_DEPRECATED_BEHAVIOR;
+ dbgSource = GL2ES2.GL_DEBUG_SOURCE_OTHER;
+ dbgType = GL2ES2.GL_DEBUG_TYPE_DEPRECATED_BEHAVIOR;
break;
case GL2GL3.GL_DEBUG_CATEGORY_UNDEFINED_BEHAVIOR_AMD:
- dbgSource = GL2GL3.GL_DEBUG_SOURCE_OTHER;
- dbgType = GL2GL3.GL_DEBUG_TYPE_UNDEFINED_BEHAVIOR;
+ dbgSource = GL2ES2.GL_DEBUG_SOURCE_OTHER;
+ dbgType = GL2ES2.GL_DEBUG_TYPE_UNDEFINED_BEHAVIOR;
break;
case GL2GL3.GL_DEBUG_CATEGORY_PERFORMANCE_AMD:
- dbgSource = GL2GL3.GL_DEBUG_SOURCE_OTHER;
- dbgType = GL2GL3.GL_DEBUG_TYPE_PERFORMANCE;
+ dbgSource = GL2ES2.GL_DEBUG_SOURCE_OTHER;
+ dbgType = GL2ES2.GL_DEBUG_TYPE_PERFORMANCE;
break;
case GL2GL3.GL_DEBUG_CATEGORY_OTHER_AMD:
default:
- dbgSource = GL2GL3.GL_DEBUG_SOURCE_OTHER;
- dbgType = GL2GL3.GL_DEBUG_TYPE_OTHER;
+ dbgSource = GL2ES2.GL_DEBUG_SOURCE_OTHER;
+ dbgType = GL2ES2.GL_DEBUG_TYPE_OTHER;
}
return new GLDebugMessage(source, when, dbgSource, dbgType, dbgId, dbgSeverity, dbgMsg);
}
- public static int translateARB2AMDCategory(int dbgSource, int dbgType) {
+ public static int translateARB2AMDCategory(final int dbgSource, final int dbgType) {
switch (dbgSource) {
- case GL2GL3.GL_DEBUG_SOURCE_WINDOW_SYSTEM:
+ case GL2ES2.GL_DEBUG_SOURCE_WINDOW_SYSTEM:
return GL2GL3.GL_DEBUG_CATEGORY_WINDOW_SYSTEM_AMD;
- case GL2GL3.GL_DEBUG_SOURCE_SHADER_COMPILER:
+ case GL2ES2.GL_DEBUG_SOURCE_SHADER_COMPILER:
return GL2GL3.GL_DEBUG_CATEGORY_SHADER_COMPILER_AMD;
- case GL2GL3.GL_DEBUG_SOURCE_APPLICATION:
+ case GL2ES2.GL_DEBUG_SOURCE_APPLICATION:
return GL2GL3.GL_DEBUG_CATEGORY_APPLICATION_AMD;
}
switch(dbgType) {
- case GL2GL3.GL_DEBUG_TYPE_DEPRECATED_BEHAVIOR:
+ case GL2ES2.GL_DEBUG_TYPE_DEPRECATED_BEHAVIOR:
return GL2GL3.GL_DEBUG_CATEGORY_DEPRECATION_AMD;
- case GL2GL3.GL_DEBUG_TYPE_UNDEFINED_BEHAVIOR:
+ case GL2ES2.GL_DEBUG_TYPE_UNDEFINED_BEHAVIOR:
return GL2GL3.GL_DEBUG_CATEGORY_UNDEFINED_BEHAVIOR_AMD;
- case GL2GL3.GL_DEBUG_TYPE_PERFORMANCE:
+ case GL2ES2.GL_DEBUG_TYPE_PERFORMANCE:
return GL2GL3.GL_DEBUG_CATEGORY_PERFORMANCE_AMD;
}
@@ -207,46 +207,46 @@ public class GLDebugMessage {
return toString(null).toString();
}
- public static String getDbgSourceString(int dbgSource) {
+ public static String getDbgSourceString(final int dbgSource) {
switch(dbgSource) {
- case GL2GL3.GL_DEBUG_SOURCE_API: return "GL API";
- case GL2GL3.GL_DEBUG_SOURCE_SHADER_COMPILER: return "GLSL or extension compiler";
- case GL2GL3.GL_DEBUG_SOURCE_WINDOW_SYSTEM: return "Native Windowing binding";
- case GL2GL3.GL_DEBUG_SOURCE_THIRD_PARTY: return "Third party";
- case GL2GL3.GL_DEBUG_SOURCE_APPLICATION: return "Application";
- case GL2GL3.GL_DEBUG_SOURCE_OTHER: return "generic";
+ case GL2ES2.GL_DEBUG_SOURCE_API: return "GL API";
+ case GL2ES2.GL_DEBUG_SOURCE_SHADER_COMPILER: return "GLSL or extension compiler";
+ case GL2ES2.GL_DEBUG_SOURCE_WINDOW_SYSTEM: return "Native Windowing binding";
+ case GL2ES2.GL_DEBUG_SOURCE_THIRD_PARTY: return "Third party";
+ case GL2ES2.GL_DEBUG_SOURCE_APPLICATION: return "Application";
+ case GL2ES2.GL_DEBUG_SOURCE_OTHER: return "generic";
default: return "Unknown (" + toHexString(dbgSource) + ")";
}
}
- public static String getDbgTypeString(int dbgType) {
+ public static String getDbgTypeString(final int dbgType) {
switch(dbgType) {
- case GL2GL3.GL_DEBUG_TYPE_ERROR: return "Error";
- case GL2GL3.GL_DEBUG_TYPE_DEPRECATED_BEHAVIOR: return "Warning: marked for deprecation";
- case GL2GL3.GL_DEBUG_TYPE_UNDEFINED_BEHAVIOR: return "Warning: undefined behavior";
- case GL2GL3.GL_DEBUG_TYPE_PERFORMANCE: return "Warning: implementation dependent performance";
- case GL2GL3.GL_DEBUG_TYPE_PORTABILITY: return "Warning: vendor-specific extension use";
- case GL2GL3.GL_DEBUG_TYPE_OTHER: return "Warning: generic";
+ case GL2ES2.GL_DEBUG_TYPE_ERROR: return "Error";
+ case GL2ES2.GL_DEBUG_TYPE_DEPRECATED_BEHAVIOR: return "Warning: marked for deprecation";
+ case GL2ES2.GL_DEBUG_TYPE_UNDEFINED_BEHAVIOR: return "Warning: undefined behavior";
+ case GL2ES2.GL_DEBUG_TYPE_PERFORMANCE: return "Warning: implementation dependent performance";
+ case GL2ES2.GL_DEBUG_TYPE_PORTABILITY: return "Warning: vendor-specific extension use";
+ case GL2ES2.GL_DEBUG_TYPE_OTHER: return "Warning: generic";
default: return "Unknown (" + toHexString(dbgType) + ")";
}
}
- public static String getDbgSeverityString(int dbgSeverity) {
+ public static String getDbgSeverityString(final int dbgSeverity) {
switch(dbgSeverity) {
- case GL2GL3.GL_DEBUG_SEVERITY_HIGH: return "High: dangerous undefined behavior";
- case GL2GL3.GL_DEBUG_SEVERITY_MEDIUM: return "Medium: Severe performance/deprecation/other warnings";
- case GL2GL3.GL_DEBUG_SEVERITY_LOW: return "Low: Performance warnings (redundancy/undefined)";
+ case GL2ES2.GL_DEBUG_SEVERITY_HIGH: return "High: dangerous undefined behavior";
+ case GL2ES2.GL_DEBUG_SEVERITY_MEDIUM: return "Medium: Severe performance/deprecation/other warnings";
+ case GL2ES2.GL_DEBUG_SEVERITY_LOW: return "Low: Performance warnings (redundancy/undefined)";
default: return "Unknown (" + toHexString(dbgSeverity) + ")";
}
}
- public static StringBuilder toHexString(StringBuilder sb, int i) {
+ public static StringBuilder toHexString(StringBuilder sb, final int i) {
if(null==sb) {
sb = new StringBuilder();
}
return sb.append("0x").append(Integer.toHexString(i));
}
- public static String toHexString(int i) {
+ public static String toHexString(final int i) {
return "0x"+Integer.toHexString(i);
}
diff --git a/src/jogl/classes/javax/media/opengl/GLDrawableFactory.java b/src/jogl/classes/javax/media/opengl/GLDrawableFactory.java
index 077daf6e9..6e7caf8f8 100644
--- a/src/jogl/classes/javax/media/opengl/GLDrawableFactory.java
+++ b/src/jogl/classes/javax/media/opengl/GLDrawableFactory.java
@@ -43,6 +43,7 @@ package javax.media.opengl;
import java.util.ArrayList;
import java.util.List;
+import com.jogamp.common.util.PropertyAccess;
import com.jogamp.common.util.ReflectionUtil;
import com.jogamp.opengl.GLAutoDrawableDelegate;
import com.jogamp.opengl.GLRendererQuirks;
@@ -142,8 +143,8 @@ public abstract class GLDrawableFactory {
final String nwt = NativeWindowFactory.getNativeWindowType(true);
GLDrawableFactory tmp = null;
- String factoryClassName = Debug.getProperty("jogl.gldrawablefactory.class.name", true);
- ClassLoader cl = GLDrawableFactory.class.getClassLoader();
+ String factoryClassName = PropertyAccess.getProperty("jogl.gldrawablefactory.class.name", true);
+ final ClassLoader cl = GLDrawableFactory.class.getClassLoader();
if (null == factoryClassName) {
if ( nwt == NativeWindowFactory.TYPE_X11 ) {
factoryClassName = "jogamp.opengl.x11.glx.X11GLXDrawableFactory";
@@ -164,7 +165,7 @@ public abstract class GLDrawableFactory {
}
try {
tmp = (GLDrawableFactory) ReflectionUtil.createInstance(factoryClassName, cl);
- } catch (Exception jre) {
+ } catch (final Exception jre) {
if (DEBUG || GLProfile.DEBUG) {
System.err.println("Info: GLDrawableFactory.static - Native Platform: "+nwt+" - not available: "+factoryClassName);
jre.printStackTrace();
@@ -179,7 +180,7 @@ public abstract class GLDrawableFactory {
if(!disableOpenGLES) {
try {
tmp = (GLDrawableFactory) ReflectionUtil.createInstance("jogamp.opengl.egl.EGLDrawableFactory", cl);
- } catch (Exception jre) {
+ } catch (final Exception jre) {
if (DEBUG || GLProfile.DEBUG) {
System.err.println("Info: GLDrawableFactory.static - EGLDrawableFactory - not available");
jre.printStackTrace();
@@ -221,7 +222,7 @@ public abstract class GLDrawableFactory {
try {
gldf.resetDisplayGamma();
gldf.shutdownImpl();
- } catch (Throwable t) {
+ } catch (final Throwable t) {
System.err.println("GLDrawableFactory.shutdownImpl: Caught "+t.getClass().getName()+" during factory shutdown #"+(i+1)+"/"+gldfCount+" "+gldf.getClass().getName());
if( DEBUG ) {
t.printStackTrace();
@@ -322,7 +323,7 @@ public abstract class GLDrawableFactory {
* @param device which {@link AbstractGraphicsDevice#getConnection() connection} denotes the shared the target device, may be null
for the platform's default device.
* @return true if a shared resource could been created, otherwise false.
*/
- protected final boolean createSharedResource(AbstractGraphicsDevice device) {
+ protected final boolean createSharedResource(final AbstractGraphicsDevice device) {
return createSharedResourceImpl(device);
}
protected abstract boolean createSharedResourceImpl(AbstractGraphicsDevice device);
@@ -343,7 +344,7 @@ public abstract class GLDrawableFactory {
* @see #getRendererQuirks(AbstractGraphicsDevice)
* @see GLRendererQuirks
*/
- public final boolean hasRendererQuirk(AbstractGraphicsDevice device, int quirk) {
+ public final boolean hasRendererQuirk(final AbstractGraphicsDevice device, final int quirk) {
final GLRendererQuirks glrq = getRendererQuirks(device);
return null != glrq ? glrq.exist(quirk) : false;
}
@@ -385,11 +386,11 @@ public abstract class GLDrawableFactory {
* @param glProfile GLProfile to determine the factory type, ie EGLDrawableFactory,
* or one of the native GLDrawableFactory's, ie X11/GLX, Windows/WGL or MacOSX/CGL.
*/
- public static GLDrawableFactory getFactory(GLProfile glProfile) throws GLException {
+ public static GLDrawableFactory getFactory(final GLProfile glProfile) throws GLException {
return getFactoryImpl(glProfile.getImplName());
}
- protected static GLDrawableFactory getFactoryImpl(String glProfileImplName) throws GLException {
+ protected static GLDrawableFactory getFactoryImpl(final String glProfileImplName) throws GLException {
if ( GLProfile.usesNativeGLES(glProfileImplName) ) {
if(null!=eglFactory) {
return eglFactory;
@@ -400,7 +401,7 @@ public abstract class GLDrawableFactory {
throw new GLException("No GLDrawableFactory available for profile: "+glProfileImplName);
}
- protected static GLDrawableFactory getFactoryImpl(AbstractGraphicsDevice device) throws GLException {
+ protected static GLDrawableFactory getFactoryImpl(final AbstractGraphicsDevice device) throws GLException {
if(null != nativeOSFactory && nativeOSFactory.getIsDeviceCompatible(device)) {
return nativeOSFactory;
}
diff --git a/src/jogl/classes/javax/media/opengl/GLException.java b/src/jogl/classes/javax/media/opengl/GLException.java
index 460f17be9..6a287c969 100644
--- a/src/jogl/classes/javax/media/opengl/GLException.java
+++ b/src/jogl/classes/javax/media/opengl/GLException.java
@@ -50,19 +50,19 @@ public class GLException extends RuntimeException {
/** Constructs a GLException object with the specified detail
message. */
- public GLException(String message) {
+ public GLException(final String message) {
super(message);
}
/** Constructs a GLException object with the specified detail
message and root cause. */
- public GLException(String message, Throwable cause) {
+ public GLException(final String message, final Throwable cause) {
super(message, cause);
}
/** Constructs a GLException object with the specified root
cause. */
- public GLException(Throwable cause) {
+ public GLException(final Throwable cause) {
super(cause);
}
}
diff --git a/src/jogl/classes/javax/media/opengl/GLPipelineFactory.java b/src/jogl/classes/javax/media/opengl/GLPipelineFactory.java
index d947bada2..ab12ba17c 100644
--- a/src/jogl/classes/javax/media/opengl/GLPipelineFactory.java
+++ b/src/jogl/classes/javax/media/opengl/GLPipelineFactory.java
@@ -88,7 +88,7 @@ public class GLPipelineFactory {
* @param downstream is always the 1st argument for the upstream constructor
* @param additionalArgs additional arguments for the upstream constructor
*/
- public static final GL create(String pipelineClazzBaseName, Class> reqInterface, GL downstream, Object[] additionalArgs) {
+ public static final GL create(final String pipelineClazzBaseName, final Class> reqInterface, final GL downstream, final Object[] additionalArgs) {
Class> downstreamClazz = downstream.getClass();
Class> upstreamClazz = null;
Class> interfaceClazz = null;
@@ -101,7 +101,7 @@ public class GLPipelineFactory {
do {
// For all interfaces: right -> left == child -> parent
// It is important that this matches with the gluegen cfg file's 'Implements' clause !
- Class>[] clazzes = downstreamClazz.getInterfaces();
+ final Class>[] clazzes = downstreamClazz.getInterfaces();
for(int i=clazzes.length-1; null==upstreamClazz && i>=0; i--) {
if(DEBUG) {
System.out.println("GLPipelineFactory: Try "+downstreamClazz.getName()+" Interface["+i+"]: "+clazzes[i].getName());
@@ -142,7 +142,7 @@ public class GLPipelineFactory {
System.out.println("GLPipelineFactory: Got : "+ upstreamClazz.getName()+", base interface: "+interfaceClazz.getName());
}
- Class>[] cstrArgTypes = new Class>[ 1 + ( ( null==additionalArgs ) ? 0 : additionalArgs.length ) ] ;
+ final Class>[] cstrArgTypes = new Class>[ 1 + ( ( null==additionalArgs ) ? 0 : additionalArgs.length ) ] ;
{
int i = 0;
cstrArgTypes[i++] = interfaceClazz;
@@ -151,10 +151,10 @@ public class GLPipelineFactory {
}
}
// throws exception if cstr not found!
- Constructor> cstr = ReflectionUtil.getConstructor(upstreamClazz, cstrArgTypes);
+ final Constructor> cstr = ReflectionUtil.getConstructor(upstreamClazz, cstrArgTypes);
Object instance = null;
try {
- Object[] cstrArgs = new Object[ 1 + ( ( null==additionalArgs ) ? 0 : additionalArgs.length ) ] ;
+ final Object[] cstrArgs = new Object[ 1 + ( ( null==additionalArgs ) ? 0 : additionalArgs.length ) ] ;
{
int i = 0;
cstrArgs[i++] = downstream;
@@ -163,7 +163,7 @@ public class GLPipelineFactory {
}
}
instance = cstr.newInstance( cstrArgs ) ;
- } catch (Throwable t) { t.printStackTrace(); }
+ } catch (final Throwable t) { t.printStackTrace(); }
if(null==instance) {
throw new GLException("Error: Couldn't create instance of pipeline: "+upstreamClazz.getName()+
" ( "+getArgsClassNameList(downstreamClazz, additionalArgs) +" )");
@@ -174,8 +174,8 @@ public class GLPipelineFactory {
return (GL) instance;
}
- private static final String getArgsClassNameList(Class> arg0, Object[] args) {
- StringBuilder sb = new StringBuilder();
+ private static final String getArgsClassNameList(final Class> arg0, final Object[] args) {
+ final StringBuilder sb = new StringBuilder();
sb.append(arg0.getName());
if(args!=null) {
for(int j=0; j[ null, GL ]
for the default profile.
* @return true if the profile is available for the device, otherwise false.
*/
- public static boolean isAvailable(AbstractGraphicsDevice device, String profile) {
+ public static boolean isAvailable(final AbstractGraphicsDevice device, final String profile) {
initSingleton();
return isAvailableImpl(getProfileMap(device, false), profile);
}
- private static boolean isAvailableImpl(HashMap[ null, GL ]
for the default profile.
* @return true if the profile is available for the default device, otherwise false.
*/
- public static boolean isAvailable(String profile) {
+ public static boolean isAvailable(final String profile) {
return isAvailable(null, profile);
}
@@ -236,21 +236,21 @@ public class GLProfile {
return isAvailable(null, null);
}
- public static String glAvailabilityToString(AbstractGraphicsDevice device) {
+ public static String glAvailabilityToString(final AbstractGraphicsDevice device) {
return glAvailabilityToString(device, null).toString();
}
- public static StringBuilder glAvailabilityToString(AbstractGraphicsDevice device, StringBuilder sb) {
+ public static StringBuilder glAvailabilityToString(final AbstractGraphicsDevice device, final StringBuilder sb) {
return glAvailabilityToString(device, sb, null, 0);
}
- private static StringBuilder doIndent(StringBuilder sb, String indent, int indentCount) {
+ private static StringBuilder doIndent(final StringBuilder sb, final String indent, int indentCount) {
while(indentCount>0) {
sb.append(indent);
indentCount--;
}
return sb;
}
- public static StringBuilder glAvailabilityToString(AbstractGraphicsDevice device, StringBuilder sb, String indent, int indentCount) {
+ public static StringBuilder glAvailabilityToString(AbstractGraphicsDevice device, StringBuilder sb, final String indent, int indentCount) {
boolean avail;
if(null == sb) {
sb = new StringBuilder();
@@ -425,7 +425,7 @@ public class GLProfile {
int profileCount = 0;
if(null != map) {
- for (Map.Entry[ null, GL ]
for the default profile.
* @throws GLException if the requested profile is not available for the device.
*/
- public static GLProfile get(AbstractGraphicsDevice device, String profile)
+ public static GLProfile get(final AbstractGraphicsDevice device, String profile)
throws GLException
{
if(null==profile || profile.equals("GL")) {
@@ -908,7 +908,7 @@ public class GLProfile {
* or [ null, GL ]
for the default profile.
* @throws GLException if the requested profile is not available for the default device.
*/
- public static GLProfile get(String profile)
+ public static GLProfile get(final String profile)
throws GLException
{
return get(defaultDevice, profile);
@@ -923,12 +923,12 @@ public class GLProfile {
* @param favorHardwareRasterizer set to true, if hardware rasterizer shall be favored, otherwise false.
* @throws GLException if the non of the requested profiles is available for the device.
*/
- public static GLProfile get(AbstractGraphicsDevice device, String[] profiles, boolean favorHardwareRasterizer)
+ public static GLProfile get(final AbstractGraphicsDevice device, final String[] profiles, final boolean favorHardwareRasterizer)
throws GLException
{
GLProfile glProfileAny = null;
- HashMapreshape
in class java.awt.Component
* @param offthread
*/
- public final boolean initializeBackend(boolean offthread) {
+ public final boolean initializeBackend(final boolean offthread) {
if( offthread ) {
new Thread(getThreadName()+"-GLJPanel_Init") {
public void run() {
@@ -412,12 +413,12 @@ public class GLJPanel extends JPanel implements AWTGLAutoDrawable, WindowClosing
}
@Override
- public final void setSharedContext(GLContext sharedContext) throws IllegalStateException {
+ public final void setSharedContext(final GLContext sharedContext) throws IllegalStateException {
helper.setSharedContext(this.getContext(), sharedContext);
}
@Override
- public final void setSharedAutoDrawable(GLAutoDrawable sharedAutoDrawable) throws IllegalStateException {
+ public final void setSharedAutoDrawable(final GLAutoDrawable sharedAutoDrawable) throws IllegalStateException {
helper.setSharedAutoDrawable(this, sharedAutoDrawable);
}
@@ -428,7 +429,7 @@ public class GLJPanel extends JPanel implements AWTGLAutoDrawable, WindowClosing
* @throws IllegalArgumentException if custom
is null
* @throws IllegalStateException if backend is already realized, i.e. this instanced already painted once.
*/
- public void setPixelBufferProvider(AWTGLPixelBufferProvider custom) throws IllegalArgumentException, IllegalStateException {
+ public void setPixelBufferProvider(final AWTGLPixelBufferProvider custom) throws IllegalArgumentException, IllegalStateException {
if( null == custom ) {
throw new IllegalArgumentException("Null PixelBufferProvider");
}
@@ -454,7 +455,7 @@ public class GLJPanel extends JPanel implements AWTGLAutoDrawable, WindowClosing
// so do everything on the event dispatch thread
try {
EventQueue.invokeAndWait(paintImmediatelyAction);
- } catch (Exception e) {
+ } catch (final Exception e) {
throw new GLException(e);
}
}
@@ -469,7 +470,7 @@ public class GLJPanel extends JPanel implements AWTGLAutoDrawable, WindowClosing
if (backend != null && backend.getContext() != null) {
boolean animatorPaused = false;
- GLAnimatorControl animator = getAnimator();
+ final GLAnimatorControl animator = getAnimator();
if(null!=animator) {
animatorPaused = animator.pause();
}
@@ -517,16 +518,16 @@ public class GLJPanel extends JPanel implements AWTGLAutoDrawable, WindowClosing
// Make GLJPanel behave better in NetBeans GUI builder
g.setColor(Color.BLACK);
g.fillRect(0, 0, getWidth(), getHeight());
- FontMetrics fm = g.getFontMetrics();
+ final FontMetrics fm = g.getFontMetrics();
String name = getName();
if (name == null) {
name = getClass().getName();
- int idx = name.lastIndexOf('.');
+ final int idx = name.lastIndexOf('.');
if (idx >= 0) {
name = name.substring(idx + 1);
}
}
- Rectangle2D bounds = fm.getStringBounds(name, g);
+ final Rectangle2D bounds = fm.getStringBounds(name, g);
g.setColor(Color.WHITE);
g.drawString(name,
(int) ((getWidth() - bounds.getWidth()) / 2),
@@ -647,7 +648,7 @@ public class GLJPanel extends JPanel implements AWTGLAutoDrawable, WindowClosing
*/
@SuppressWarnings("deprecation")
@Override
- public void reshape(int x, int y, int width, int height) {
+ public void reshape(final int x, final int y, final int width, final int height) {
super.reshape(x, y, width, height);
reshapeImpl(width, height);
}
@@ -675,7 +676,7 @@ public class GLJPanel extends JPanel implements AWTGLAutoDrawable, WindowClosing
private AWTTilePainter printAWTTiles = null;
@Override
- public void setupPrint(double scaleMatX, double scaleMatY, int numSamples, int tileWidth, int tileHeight) {
+ public void setupPrint(final double scaleMatX, final double scaleMatY, final int numSamples, final int tileWidth, final int tileHeight) {
printActive = true;
final int componentCount = isOpaque() ? 3 : 4;
final TileRenderer printRenderer = new TileRenderer();
@@ -802,7 +803,7 @@ public class GLJPanel extends JPanel implements AWTGLAutoDrawable, WindowClosing
};
@Override
- public void print(Graphics graphics) {
+ public void print(final Graphics graphics) {
if( !printActive ) {
throw new IllegalStateException("setupPrint() not called");
}
@@ -837,7 +838,7 @@ public class GLJPanel extends JPanel implements AWTGLAutoDrawable, WindowClosing
printAWTTiles.resetGraphics2D();
}
}
- } catch (NoninvertibleTransformException nte) {
+ } catch (final NoninvertibleTransformException nte) {
System.err.println("Caught: Inversion failed of: "+g2d.getTransform());
nte.printStackTrace();
}
@@ -846,7 +847,7 @@ public class GLJPanel extends JPanel implements AWTGLAutoDrawable, WindowClosing
}
}
@Override
- protected void printComponent(Graphics g) {
+ protected void printComponent(final Graphics g) {
if( DEBUG ) {
System.err.println("AWT printComponent.X: "+printAWTTiles);
}
@@ -854,7 +855,7 @@ public class GLJPanel extends JPanel implements AWTGLAutoDrawable, WindowClosing
}
@Override
- public void setOpaque(boolean opaque) {
+ public void setOpaque(final boolean opaque) {
if (backend != null) {
backend.setOpaque(opaque);
}
@@ -862,12 +863,12 @@ public class GLJPanel extends JPanel implements AWTGLAutoDrawable, WindowClosing
}
@Override
- public void addGLEventListener(GLEventListener listener) {
+ public void addGLEventListener(final GLEventListener listener) {
helper.addGLEventListener(listener);
}
@Override
- public void addGLEventListener(int index, GLEventListener listener) {
+ public void addGLEventListener(final int index, final GLEventListener listener) {
helper.addGLEventListener(index, listener);
}
@@ -877,7 +878,7 @@ public class GLJPanel extends JPanel implements AWTGLAutoDrawable, WindowClosing
}
@Override
- public GLEventListener getGLEventListener(int index) throws IndexOutOfBoundsException {
+ public GLEventListener getGLEventListener(final int index) throws IndexOutOfBoundsException {
return helper.getGLEventListener(index);
}
@@ -887,17 +888,17 @@ public class GLJPanel extends JPanel implements AWTGLAutoDrawable, WindowClosing
}
@Override
- public boolean getGLEventListenerInitState(GLEventListener listener) {
+ public boolean getGLEventListenerInitState(final GLEventListener listener) {
return helper.getGLEventListenerInitState(listener);
}
@Override
- public void setGLEventListenerInitState(GLEventListener listener, boolean initialized) {
+ public void setGLEventListenerInitState(final GLEventListener listener, final boolean initialized) {
helper.setGLEventListenerInitState(listener, initialized);
}
@Override
- public GLEventListener disposeGLEventListener(GLEventListener listener, boolean remove) {
+ public GLEventListener disposeGLEventListener(final GLEventListener listener, final boolean remove) {
final DisposeGLEventListenerAction r = new DisposeGLEventListenerAction(listener, remove);
if (EventQueue.isDispatchThread()) {
r.run();
@@ -906,7 +907,7 @@ public class GLJPanel extends JPanel implements AWTGLAutoDrawable, WindowClosing
// so do everything on the event dispatch thread
try {
EventQueue.invokeAndWait(r);
- } catch (Exception e) {
+ } catch (final Exception e) {
throw new GLException(e);
}
}
@@ -914,12 +915,12 @@ public class GLJPanel extends JPanel implements AWTGLAutoDrawable, WindowClosing
}
@Override
- public GLEventListener removeGLEventListener(GLEventListener listener) {
+ public GLEventListener removeGLEventListener(final GLEventListener listener) {
return helper.removeGLEventListener(listener);
}
@Override
- public void setAnimator(GLAnimatorControl animatorControl) {
+ public void setAnimator(final GLAnimatorControl animatorControl) {
helper.setAnimator(animatorControl);
}
@@ -929,7 +930,7 @@ public class GLJPanel extends JPanel implements AWTGLAutoDrawable, WindowClosing
}
@Override
- public final Thread setExclusiveContextThread(Thread t) throws GLException {
+ public final Thread setExclusiveContextThread(final Thread t) throws GLException {
return helper.setExclusiveContextThread(t, getContext());
}
@@ -939,7 +940,7 @@ public class GLJPanel extends JPanel implements AWTGLAutoDrawable, WindowClosing
}
@Override
- public boolean invoke(boolean wait, GLRunnable glRunnable) {
+ public boolean invoke(final boolean wait, final GLRunnable glRunnable) {
return helper.invoke(this, wait, glRunnable);
}
@@ -949,7 +950,7 @@ public class GLJPanel extends JPanel implements AWTGLAutoDrawable, WindowClosing
}
@Override
- public GLContext createContext(GLContext shareWith) {
+ public GLContext createContext(final GLContext shareWith) {
final Backend b = backend;
if ( null == b ) {
return null;
@@ -958,7 +959,7 @@ public class GLJPanel extends JPanel implements AWTGLAutoDrawable, WindowClosing
}
@Override
- public void setRealized(boolean realized) {
+ public void setRealized(final boolean realized) {
}
@Override
@@ -967,7 +968,7 @@ public class GLJPanel extends JPanel implements AWTGLAutoDrawable, WindowClosing
}
@Override
- public GLContext setContext(GLContext newCtx, boolean destroyPrevCtx) {
+ public GLContext setContext(final GLContext newCtx, final boolean destroyPrevCtx) {
final Backend b = backend;
if ( null == b ) {
return null;
@@ -1002,13 +1003,13 @@ public class GLJPanel extends JPanel implements AWTGLAutoDrawable, WindowClosing
if (Beans.isDesignTime()) {
return null;
}
- GLContext context = getContext();
+ final GLContext context = getContext();
return (context == null) ? null : context.getGL();
}
@Override
- public GL setGL(GL gl) {
- GLContext context = getContext();
+ public GL setGL(final GL gl) {
+ final GLContext context = getContext();
if (context != null) {
context.setGL(gl);
return gl;
@@ -1017,7 +1018,7 @@ public class GLJPanel extends JPanel implements AWTGLAutoDrawable, WindowClosing
}
@Override
- public void setAutoSwapBufferMode(boolean enable) {
+ public void setAutoSwapBufferMode(final boolean enable) {
this.autoSwapBufferMode = enable;
boolean backendHandlesSwapBuffer = false;
if( isInitialized ) {
@@ -1047,7 +1048,7 @@ public class GLJPanel extends JPanel implements AWTGLAutoDrawable, WindowClosing
}
@Override
- public void setContextCreationFlags(int flags) {
+ public void setContextCreationFlags(final int flags) {
additionalCtxCreationFlags = flags;
}
@@ -1111,7 +1112,7 @@ public class GLJPanel extends JPanel implements AWTGLAutoDrawable, WindowClosing
* See constraints of {@link #isGLOriented()}.
*