diff options
Diffstat (limited to 'src/jogl/classes/jogamp/opengl/macosx/cgl/MacOSXPbufferCGLDrawable.java')
-rw-r--r-- | src/jogl/classes/jogamp/opengl/macosx/cgl/MacOSXPbufferCGLDrawable.java | 24 |
1 files changed, 12 insertions, 12 deletions
diff --git a/src/jogl/classes/jogamp/opengl/macosx/cgl/MacOSXPbufferCGLDrawable.java b/src/jogl/classes/jogamp/opengl/macosx/cgl/MacOSXPbufferCGLDrawable.java index eba97a9ca..b1d560f4a 100644 --- a/src/jogl/classes/jogamp/opengl/macosx/cgl/MacOSXPbufferCGLDrawable.java +++ b/src/jogl/classes/jogamp/opengl/macosx/cgl/MacOSXPbufferCGLDrawable.java @@ -73,7 +73,7 @@ public class MacOSXPbufferCGLDrawable extends MacOSXCGLDrawable { protected int pBufferTexTarget, pBufferTexWidth, pBufferTexHeight; - public MacOSXPbufferCGLDrawable(GLDrawableFactory factory, NativeSurface target) { + public MacOSXPbufferCGLDrawable(final GLDrawableFactory factory, final NativeSurface target) { super(factory, target, false); } @@ -87,7 +87,7 @@ public class MacOSXPbufferCGLDrawable extends MacOSXCGLDrawable { } @Override - public GLContext createContext(GLContext shareWith) { + public GLContext createContext(final GLContext shareWith) { return new MacOSXCGLContext(this, shareWith); } @@ -121,7 +121,7 @@ public class MacOSXPbufferCGLDrawable extends MacOSXCGLDrawable { final DefaultGraphicsConfiguration config = (DefaultGraphicsConfiguration) ms.getGraphicsConfiguration(); final GLCapabilitiesImmutable capabilities = (GLCapabilitiesImmutable)config.getChosenCapabilities(); final GLProfile glProfile = capabilities.getGLProfile(); - MacOSXCGLDrawableFactory.SharedResource sr = ((MacOSXCGLDrawableFactory)factory).getOrCreateSharedResourceImpl(config.getScreen().getDevice()); + final MacOSXCGLDrawableFactory.SharedResource sr = ((MacOSXCGLDrawableFactory)factory).getOrCreateSharedResourceImpl(config.getScreen().getDevice()); if (DEBUG) { System.out.println(getThreadName()+": Pbuffer config: " + config); @@ -160,13 +160,13 @@ public class MacOSXPbufferCGLDrawable extends MacOSXCGLDrawable { } @Override - public void setOpenGLMode(GLBackendType mode) { + public void setOpenGLMode(final GLBackendType mode) { super.setOpenGLMode(mode); createPbuffer(); // recreate } @Override - protected void initOpenGLImpl(GLBackendType backend) { + protected void initOpenGLImpl(final GLBackendType backend) { switch (backend) { case NSOPENGL: impl = new NSOpenGLImpl(); @@ -182,12 +182,12 @@ public class MacOSXPbufferCGLDrawable extends MacOSXCGLDrawable { // NSOpenGLPixelBuffer implementation class NSOpenGLImpl implements GLBackendImpl { @Override - public long create(int renderTarget, int internalFormat, int width, int height) { + public long create(final int renderTarget, final int internalFormat, final int width, final int height) { return CGL.createPBuffer(renderTarget, internalFormat, width, height); } @Override - public void destroy(long pbuffer) { + public void destroy(final long pbuffer) { CGL.destroyPBuffer(pbuffer); } } @@ -195,9 +195,9 @@ public class MacOSXPbufferCGLDrawable extends MacOSXCGLDrawable { // CGL implementation class CGLImpl implements GLBackendImpl { @Override - public long create(int renderTarget, int internalFormat, int width, int height) { - PointerBuffer pbuffer = PointerBuffer.allocateDirect(1); - int res = CGL.CGLCreatePBuffer(width, height, renderTarget, internalFormat, 0, pbuffer); + public long create(final int renderTarget, final int internalFormat, final int width, final int height) { + final PointerBuffer pbuffer = PointerBuffer.allocateDirect(1); + final int res = CGL.CGLCreatePBuffer(width, height, renderTarget, internalFormat, 0, pbuffer); if (res != CGL.kCGLNoError) { throw new GLException("Error creating CGL-based pbuffer: error code " + res); } @@ -205,8 +205,8 @@ public class MacOSXPbufferCGLDrawable extends MacOSXCGLDrawable { } @Override - public void destroy(long pbuffer) { - int res = CGL.CGLDestroyPBuffer(pbuffer); + public void destroy(final long pbuffer) { + final int res = CGL.CGLDestroyPBuffer(pbuffer); if (res != CGL.kCGLNoError) { throw new GLException("Error destroying CGL-based pbuffer: error code " + res); } |