summaryrefslogtreecommitdiffstats
path: root/make/gl-common.cfg
diff options
context:
space:
mode:
authorKenneth Russel <[email protected]>2005-08-29 07:03:51 +0000
committerKenneth Russel <[email protected]>2005-08-29 07:03:51 +0000
commit6737d87b266ba10a56e8975fed42805608bd37d4 (patch)
tree50b2433f44fe7b413cc58cceac9ec49f089dbd75 /make/gl-common.cfg
parent6b9841f75655fabd491f7410643272d36eddc77e (diff)
Restructured generation of MethodBindings and emitters to more closely
match desired new code generation style of mapping void* to Buffer and to support non-direct Buffers. Removed expansion of void* to multiple primitive array types. Primitive-type C pointers (such as int*) are now exposed as IntBuffer and (optionally) int[], if NioDirectOnly has not been specified. The int[] variant is a simple wrapper around the indirect buffer implementation. If desired, expansion of void* to other array types could be layered on this new support. Rewrote and simplified expandMethodBinding and split up creation of emitters into generatePublicEmitters and generatePrivateEmitters. Deleted JavaMethodBindingImplEmitter and CMethodBindingImplEmitter and folded their functionality into their superclasses, controlled under flags, which makes it more straightforward to tweak a given emitter to produce correct glue code. Restructured OpenGL-specific JavaGLPAWrapperEmitter and CGLPAWrapperEmitter and how they are created by the GLEmitter; these classes are now much simpler than before. Changed how data types are passed from MethodBindings to Emitters. Generally only two MethodBindings will be created, one which maps types like int* to IntBuffer and one which maps it to int[]. The version taking Buffers will be the only one for which glue code will be generated; the one taking int[] will call the native code for the indirect buffer case for the one taking Buffers. Compound types (representing C structs) and compound type arrays (represending arrays of C structs) are no longer mapped to NIO ByteBuffers and arrays of NIO ByteBuffers by the MethodBinding; erasure and lowering of types is now handled by the Emitters, to preserve more type information during the code generation process. It is unclear whether this is in the end a simplification or just pushing code around, but it does help reduce confusion over the number of MethodBindings floating around in the system and what purpose they served. Restructured cure JOGL code and demos to work with new APIs, in particular new glTexImage*D, glDrawElements, and glReadPixels Buffer arguments. Fixed performance problem in new Animator which occurred with VertexArrayRange demo. Added new gluPickMatrix entry point to be able to implement NIO variant in generated signatures. Some further simplifications of the new code may be possible (i.e., some new flags in JavaMethodBindingEmitter and MethodBinding removed) and it is possible more unused code remains to be deleted. As it stands the new GL.java is significantly smaller than before, as all of the expansions of void* to primitive arrays are gone, several areas of GlueGen are easier to understand, and while some functionality has been lost, the autogenerated APIs are basically in the final form specified by JSR-231. Tested with the JOGL demos on Windows and Linux. git-svn-id: file:///usr/local/projects/SUN/JOGL/git-svn/svn-server-sync/jogl/branches/JSR-231@353 232f8b59-042b-4e1e-8c03-345bb8c30851
Diffstat (limited to 'make/gl-common.cfg')
-rw-r--r--make/gl-common.cfg26
1 files changed, 4 insertions, 22 deletions
diff --git a/make/gl-common.cfg b/make/gl-common.cfg
index f71f32fc4..1b97d42aa 100644
--- a/make/gl-common.cfg
+++ b/make/gl-common.cfg
@@ -15,20 +15,6 @@ Import net.java.games.jogl.impl.*
GLHeader GL/gl.h
GLHeader GL/glext.h
-# Generate "flattened" NIO variants for routines taking C primitive
-# pointers that aren't of type void*
-NioMode ALL_POINTERS
-
-# Comment out FlattenNIOVariants since default is true
-# FlattenNIOVariants true
-
-# Generate Java primitive arrays for all C pointers, including void *
-PrimitiveArrayExpansionMode ALL_POINTERS
-
-# For expansion of C void* pointers, expand into the following Java
-# primitive types: short, int, float, byte, double
-VoidPointerExpansion short int float byte double
-
# Don't output #defines of GL version identifier strings as constants,
# because we don't need them java-side.
Ignore GL_VERSION_.+
@@ -88,14 +74,6 @@ Ignore glUnmapObjectBufferATI
# Ignore some GL functions that have outgoing void** parameters; we cannot yet deal with them
Ignore glGetVariantPointervEXT
-# Some GL functions have multiple void* arguments but require them to
-# contain data of the same type; make sure that when bindings are
-# expanded those arguments have the same type.
-MirrorExpandedBindingArgs glSeparableFilter2D 6 7
-MirrorExpandedBindingArgs glSeparableFilter2DEXT 6 7
-MirrorExpandedBindingArgs glGetSeparableFilter 3 4
-MirrorExpandedBindingArgs glGetSeparableFilterEXT 3 4
-
# FIXME: these extensions require either a handle to a device context
# or take void** parameters or both. Until we think through the
# semantics of each of these individually we need to disable them.
@@ -205,9 +183,13 @@ ArgumentIsString glProgramNamedParameter4fvNV 2
ArgumentIsString glProgramNamedParameter4dvNV 2
ArgumentIsString glGetProgramNamedParameterfvNV 2
ArgumentIsString glGetProgramNamedParameterdvNV 2
+ArgumentIsString glShaderSource 2
ArgumentIsString glShaderSourceARB 2
+ArgumentIsString glGetUniformLocation 1
ArgumentIsString glGetUniformLocationARB 1
+ArgumentIsString glBindAttribLocation 2
ArgumentIsString glBindAttribLocationARB 2
+ArgumentIsString glGetAttribLocation 1
ArgumentIsString glGetAttribLocationARB 1
# Javadoc for the GL class