diff options
author | Sven Gothel <[email protected]> | 2014-07-03 16:21:36 +0200 |
---|---|---|
committer | Sven Gothel <[email protected]> | 2014-07-03 16:21:36 +0200 |
commit | 556d92b63555a085b25e32b1cd55afce24edd07a (patch) | |
tree | 6be2b02c62a77d5aba81ffbe34c46960608be163 /src/jogl/classes/jogamp/opengl/macosx/cgl/MacOSXCGLGraphicsConfiguration.java | |
parent | a90f4a51dffec3247278e3c683ed4462b1dd9ab5 (diff) |
Code Clean-Up based on our Recommended Settings (jogamp-scripting c47bc86ae2ee268a1f38c5580d11f93d7f8d6e74)
- Change non static accesses to static members using declaring type
- Change indirect accesses to static members to direct accesses (accesses through subtypes)
- Add final modifier to private fields
- Add final modifier to method parameters
- Add final modifier to local variables
- Remove unnecessary casts
- Remove unnecessary '$NON-NLS$' tags
- Remove trailing white spaces on all lines
Diffstat (limited to 'src/jogl/classes/jogamp/opengl/macosx/cgl/MacOSXCGLGraphicsConfiguration.java')
-rw-r--r-- | src/jogl/classes/jogamp/opengl/macosx/cgl/MacOSXCGLGraphicsConfiguration.java | 26 |
1 files changed, 13 insertions, 13 deletions
diff --git a/src/jogl/classes/jogamp/opengl/macosx/cgl/MacOSXCGLGraphicsConfiguration.java b/src/jogl/classes/jogamp/opengl/macosx/cgl/MacOSXCGLGraphicsConfiguration.java index 481c0b94b..cd89ad526 100644 --- a/src/jogl/classes/jogamp/opengl/macosx/cgl/MacOSXCGLGraphicsConfiguration.java +++ b/src/jogl/classes/jogamp/opengl/macosx/cgl/MacOSXCGLGraphicsConfiguration.java @@ -53,8 +53,8 @@ import com.jogamp.nativewindow.MutableGraphicsConfiguration; public class MacOSXCGLGraphicsConfiguration extends MutableGraphicsConfiguration implements Cloneable { - MacOSXCGLGraphicsConfiguration(AbstractGraphicsScreen screen, - GLCapabilitiesImmutable capsChosen, GLCapabilitiesImmutable capsRequested) { + MacOSXCGLGraphicsConfiguration(final AbstractGraphicsScreen screen, + final GLCapabilitiesImmutable capsChosen, final GLCapabilitiesImmutable capsRequested) { super(screen, capsChosen, capsRequested); } @@ -63,8 +63,8 @@ public class MacOSXCGLGraphicsConfiguration extends MutableGraphicsConfiguration return super.clone(); } - protected static List<GLCapabilitiesImmutable> getAvailableCapabilities(MacOSXCGLDrawableFactory factory, AbstractGraphicsDevice device) { - MacOSXCGLDrawableFactory.SharedResource sharedResource = factory.getOrCreateSharedResourceImpl(device); + protected static List<GLCapabilitiesImmutable> getAvailableCapabilities(final MacOSXCGLDrawableFactory factory, final AbstractGraphicsDevice device) { + final MacOSXCGLDrawableFactory.SharedResource sharedResource = factory.getOrCreateSharedResourceImpl(device); if(null == sharedResource) { throw new GLException("Shared resource for device n/a: "+device); } @@ -88,7 +88,7 @@ public class MacOSXCGLGraphicsConfiguration extends MutableGraphicsConfiguration CGL.NSOpenGLPFASampleBuffers, CGL.NSOpenGLPFASamples }); - static IntBuffer GLCapabilities2NSAttribList(AbstractGraphicsDevice device, IntBuffer attrToken, GLCapabilitiesImmutable caps, int ctp, int major, int minor) { + static IntBuffer GLCapabilities2NSAttribList(final AbstractGraphicsDevice device, final IntBuffer attrToken, final GLCapabilitiesImmutable caps, final int ctp, final int major, final int minor) { final int len = attrToken.remaining(); final int off = attrToken.position(); final IntBuffer ivalues = Buffers.newDirectIntBuffer(len); @@ -155,7 +155,7 @@ public class MacOSXCGLGraphicsConfiguration extends MutableGraphicsConfiguration return ivalues; } - static long GLCapabilities2NSPixelFormat(AbstractGraphicsDevice device, GLCapabilitiesImmutable caps, int ctp, int major, int minor) { + static long GLCapabilities2NSPixelFormat(final AbstractGraphicsDevice device, final GLCapabilitiesImmutable caps, final int ctp, final int major, final int minor) { final IntBuffer attrToken = cglInternalAttributeToken.duplicate(); if ( !MacOSXCGLContext.isLionOrLater ) { // no OpenGLProfile @@ -165,11 +165,11 @@ public class MacOSXCGLGraphicsConfiguration extends MutableGraphicsConfiguration return CGL.createPixelFormat(attrToken, attrToken.remaining(), ivalues); } - static GLCapabilities NSPixelFormat2GLCapabilities(GLProfile glp, long pixelFormat) { + static GLCapabilities NSPixelFormat2GLCapabilities(final GLProfile glp, final long pixelFormat) { return PixelFormat2GLCapabilities(glp, pixelFormat, true); } - static long GLCapabilities2CGLPixelFormat(AbstractGraphicsDevice device, GLCapabilitiesImmutable caps, int ctp, int major, int minor) { + static long GLCapabilities2CGLPixelFormat(final AbstractGraphicsDevice device, final GLCapabilitiesImmutable caps, final int ctp, final int major, final int minor) { // Set up pixel format attributes final IntBuffer attrs = Buffers.newDirectIntBuffer(256); int i = 0; @@ -214,20 +214,20 @@ public class MacOSXCGLGraphicsConfiguration extends MutableGraphicsConfiguration } // Use attribute array to select pixel format - PointerBuffer fmt = PointerBuffer.allocateDirect(1); - IntBuffer numScreens = Buffers.newDirectIntBuffer(1); - int res = CGL.CGLChoosePixelFormat(attrs, fmt, numScreens); + final PointerBuffer fmt = PointerBuffer.allocateDirect(1); + final IntBuffer numScreens = Buffers.newDirectIntBuffer(1); + final int res = CGL.CGLChoosePixelFormat(attrs, fmt, numScreens); if (res != CGL.kCGLNoError) { throw new GLException("Error code " + res + " while choosing pixel format"); } return fmt.get(0); } - static GLCapabilities CGLPixelFormat2GLCapabilities(long pixelFormat) { + static GLCapabilities CGLPixelFormat2GLCapabilities(final long pixelFormat) { return PixelFormat2GLCapabilities(null, pixelFormat, false); } - private static GLCapabilities PixelFormat2GLCapabilities(GLProfile glp, long pixelFormat, boolean nsUsage) { + private static GLCapabilities PixelFormat2GLCapabilities(GLProfile glp, final long pixelFormat, final boolean nsUsage) { final IntBuffer attrToken = cglInternalAttributeToken.duplicate(); final int off; if ( !MacOSXCGLContext.isLionOrLater ) { |