From 48fda1ba14e025d9d6a984953219868c73318e5b Mon Sep 17 00:00:00 2001 From: Travis Bryson Date: Wed, 25 May 2005 01:49:58 +0000 Subject: Modified Files: jogl/make/gl-common.cfg jogl/make/gl-glx-common.cfg jogl/src/net/java/games/gluegen/opengl/JavaGLPAWrapperEmitter.java jogl/src/net/java/games/gluegen/runtime/BufferFactory.java jogl/src/net/java/games/gluegen/JavaEmitter.java jogl/src/net/java/games/gluegen/JavaConfiguration.java jogl/src/net/java/games/gluegen/CMethodBindingEmitter.java jogl/src/net/java/games/gluegen/JavaMethodBindingEmitter.java jogl/src/net/java/games/gluegen/CMethodBindingImplEmitter.java jogl/src/net/java/games/gluegen/JavaMethodBindingImplEmitter.java jogl/src/net/java/games/jogl/util/BufferUtils.java Changes: * Add NIODirectOnly grammar for description of methods that should have only NIO Direct Buffer option (no expansion into other types, and also will not be expanded to include indirect Buffer when we add that functionality) * Make changes to respect Direct Buffer position value. This allows a setting of an internal Buffer object parameter and JOGL will start reading data at the point in the buffer to which this position is set * The code is now generated to always respect this offset option. This has the affect of changing the internal signatures of all methods that use Buffers. But it does not affect the external API at all. * Old JOGL programs will continue working the same as long as they had the Buffer position set to zero before (the default value) git-svn-id: file:///usr/local/projects/SUN/JOGL/git-svn/svn-server-sync/jogl/branches/JSR-231@281 232f8b59-042b-4e1e-8c03-345bb8c30851 --- src/net/java/games/gluegen/JavaEmitter.java | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) (limited to 'src/net/java/games/gluegen/JavaEmitter.java') diff --git a/src/net/java/games/gluegen/JavaEmitter.java b/src/net/java/games/gluegen/JavaEmitter.java index f635c2d44..0b0186cdd 100644 --- a/src/net/java/games/gluegen/JavaEmitter.java +++ b/src/net/java/games/gluegen/JavaEmitter.java @@ -1256,7 +1256,7 @@ public class JavaEmitter implements GlueEmitter { MethodBinding variant = null; // Non-NIO variants for non-void C primitive pointer types - if (!cfg.nioOnly(mb.getCSymbol().getName()) && !t.isCVoidPointerType() + if (!cfg.nioDirectOnly(mb.getCSymbol().getName()) && !t.isCVoidPointerType() && !cfg.isPrimArrayExpModeNoPtrs()) { if (t.isCCharPointerType()) { variant = mb.createCPrimitivePointerVariant(j, javaType(ArrayTypes.byteArrayClass)); @@ -1286,7 +1286,7 @@ public class JavaEmitter implements GlueEmitter { // Non-NIO variants for void* C primitive pointer type - if (!cfg.nioOnly(mb.getCSymbol().getName()) && t.isCVoidPointerType() + if (!cfg.nioDirectOnly(mb.getCSymbol().getName()) && t.isCVoidPointerType() && cfg.isPrimArrayExpModeAllPtrs()) { if (cfg.voidPointerExpansionToBoolean()) { variant = mb.createCPrimitivePointerVariant(j, javaType(ArrayTypes.booleanArrayClass)); @@ -1332,8 +1332,10 @@ public class JavaEmitter implements GlueEmitter { } // NIO variants for non-void* C primitive pointer types - if ((cfg.nioMode() == JavaConfiguration.NIO_MODE_ALL_POINTERS && !cfg.noNio(mb.getCSymbol().getName())) || - (cfg.nioMode() == JavaConfiguration.NIO_MODE_VOID_ONLY && cfg.forcedNio(mb.getCSymbol().getName()))) { + if ((cfg.nioMode() == JavaConfiguration.NIO_MODE_ALL_POINTERS && + !cfg.noNio(mb.getCSymbol().getName())) || + (cfg.nioMode() == JavaConfiguration.NIO_MODE_VOID_ONLY && + cfg.forcedNio(mb.getCSymbol().getName()))) { if (t.isCCharPointerType()) { variant = mb.createCPrimitivePointerVariant(j, JavaType.forNIOByteBufferClass()); if (! result.contains(variant)) result.add(variant); -- cgit v1.2.3