diff options
author | sg215889 <[email protected]> | 2009-07-12 17:34:27 -0700 |
---|---|---|
committer | sg215889 <[email protected]> | 2009-07-12 17:34:27 -0700 |
commit | 69d2f49619b303e51e1583a02115756dfc6d1f2f (patch) | |
tree | 014d45d9d1f8708e3f1bf8e370891c99f913a7a5 /src/jogl/classes/com/sun/opengl/impl/x11 | |
parent | 9d910cf21fb8a61e3a1604f6258364c3b725964d (diff) |
Add: Extended support for CVM:
- GLX, CGL, WGL
- GL2ES12 desktop ES1 and ES2 common profile
Cleanup JAR file seperation
- New: jogl.cdcfp.jar (ALL for CVM/CDC)
- New: setup.nogl2es12 (Allow GL2ES12 for CVM without gl2/gl3)
- Clean dependencies of GLX, WGL, CGL (incl. for GL2ES12)
- Only build supported JAR archive, ie if they are being build
Fix GL2ES12: Only add impl. for ES1 and ES2 interface methods
- Use new com.sun.gluegen.runtime.PointerBuffer, to support CVM
- CVM and J2SE Java JAR archives are equal!
- Well, the build form *everything* includes some empty directories
in the cdcfp JAR archives though.
- Removed last AWT dependency in MacOSX chain
- GLDrawableFactory
- com.sun.opengl.impl.macosx.cgl.MacOSXCGLDrawableFactory
- com.sun.opengl.impl.macosx.cgl.awt.MacOSXAWTCGLDrawableFactory
Diffstat (limited to 'src/jogl/classes/com/sun/opengl/impl/x11')
4 files changed, 7 insertions, 8 deletions
diff --git a/src/jogl/classes/com/sun/opengl/impl/x11/glx/X11ExternalGLXDrawable.java b/src/jogl/classes/com/sun/opengl/impl/x11/glx/X11ExternalGLXDrawable.java index 7f65c0d89..9a5e42382 100755 --- a/src/jogl/classes/com/sun/opengl/impl/x11/glx/X11ExternalGLXDrawable.java +++ b/src/jogl/classes/com/sun/opengl/impl/x11/glx/X11ExternalGLXDrawable.java @@ -45,7 +45,7 @@ import com.sun.opengl.impl.*; import com.sun.nativewindow.impl.NullWindow; import com.sun.nativewindow.impl.x11.*; -import java.nio.LongBuffer; +import com.sun.gluegen.runtime.PointerBuffer; public class X11ExternalGLXDrawable extends X11GLXDrawable { private int fbConfigID; @@ -193,7 +193,7 @@ public class X11ExternalGLXDrawable extends X11GLXDrawable { }; float[] fattributes = new float[0]; int[] nelementsTmp = new int[1]; - LongBuffer fbConfigs = GLX.glXChooseFBConfigCopied(display, screen, iattributes, 0, nelementsTmp, 0); + PointerBuffer fbConfigs = GLX.glXChooseFBConfigCopied(display, screen, iattributes, 0, nelementsTmp, 0); int nelements = nelementsTmp[0]; if (nelements <= 0) { throw new GLException("context creation error: couldn't find a suitable frame buffer configuration"); diff --git a/src/jogl/classes/com/sun/opengl/impl/x11/glx/X11GLXDrawableFactory.java b/src/jogl/classes/com/sun/opengl/impl/x11/glx/X11GLXDrawableFactory.java index 08e8b2b2f..de211af79 100644 --- a/src/jogl/classes/com/sun/opengl/impl/x11/glx/X11GLXDrawableFactory.java +++ b/src/jogl/classes/com/sun/opengl/impl/x11/glx/X11GLXDrawableFactory.java @@ -49,7 +49,6 @@ import com.sun.opengl.impl.x11.glx.*; import com.sun.nativewindow.impl.NullWindow; import com.sun.nativewindow.impl.NWReflection; import com.sun.nativewindow.impl.x11.*; -import com.sun.nativewindow.impl.jawt.x11.*; public class X11GLXDrawableFactory extends GLDrawableFactoryImpl implements DynamicLookupHelper { public X11GLXDrawableFactory() { @@ -229,7 +228,7 @@ public class X11GLXDrawableFactory extends GLDrawableFactoryImpl implements Dyna protected Buffer getGammaRamp() { int size = getGammaRampLength(); - ShortBuffer rampData = ShortBuffer.allocate(3 * size); + ShortBuffer rampData = ShortBuffer.wrap(new short[3 * size]); rampData.position(0); rampData.limit(size); ShortBuffer redRampData = rampData.slice(); diff --git a/src/jogl/classes/com/sun/opengl/impl/x11/glx/X11GLXGraphicsConfigurationFactory.java b/src/jogl/classes/com/sun/opengl/impl/x11/glx/X11GLXGraphicsConfigurationFactory.java index 9acf580c4..0fcb9b3ff 100644 --- a/src/jogl/classes/com/sun/opengl/impl/x11/glx/X11GLXGraphicsConfigurationFactory.java +++ b/src/jogl/classes/com/sun/opengl/impl/x11/glx/X11GLXGraphicsConfigurationFactory.java @@ -41,6 +41,8 @@ import javax.media.opengl.*; import com.sun.opengl.impl.*; import com.sun.opengl.impl.x11.glx.*; +import com.sun.gluegen.runtime.PointerBuffer; + /** Subclass of GraphicsConfigurationFactory used when non-AWT tookits are used on X11 platforms. Toolkits will likely need to delegate to this one to change the accepted and returned types of the @@ -89,7 +91,7 @@ public class X11GLXGraphicsConfigurationFactory extends GraphicsConfigurationFac int[] attribs = X11GLXGraphicsConfiguration.GLCapabilities2AttribList(caps, true, isMultisampleAvailable, usePBuffer, 0, 0); int[] count = { -1 }; - java.nio.LongBuffer fbcfgsL = GLX.glXChooseFBConfigCopied(display, screen, attribs, 0, count, 0); + PointerBuffer fbcfgsL = GLX.glXChooseFBConfigCopied(display, screen, attribs, 0, count, 0); if (fbcfgsL == null || fbcfgsL.limit()<1) { throw new Exception("Could not fetch FBConfig for "+caps); } @@ -166,7 +168,7 @@ public class X11GLXGraphicsConfigurationFactory extends GraphicsConfigurationFac boolean usePBuffer) { int recommendedIndex = -1; GLCapabilities[] caps = null; - java.nio.LongBuffer fbcfgsL = null; + PointerBuffer fbcfgsL = null; int chosen=-1; int retFBID=-1; XVisualInfo retXVisualInfo = null; diff --git a/src/jogl/classes/com/sun/opengl/impl/x11/glx/X11PbufferGLXDrawable.java b/src/jogl/classes/com/sun/opengl/impl/x11/glx/X11PbufferGLXDrawable.java index 1aafe89c8..753e9d884 100644 --- a/src/jogl/classes/com/sun/opengl/impl/x11/glx/X11PbufferGLXDrawable.java +++ b/src/jogl/classes/com/sun/opengl/impl/x11/glx/X11PbufferGLXDrawable.java @@ -46,8 +46,6 @@ import com.sun.opengl.impl.x11.glx.*; import com.sun.nativewindow.impl.NullWindow; import com.sun.nativewindow.impl.x11.*; -import java.nio.LongBuffer; - public class X11PbufferGLXDrawable extends X11GLXDrawable { protected X11PbufferGLXDrawable(GLDrawableFactory factory, AbstractGraphicsScreen screen, GLCapabilities caps, |