diff options
author | Kenneth Russel <[email protected]> | 2005-08-29 07:03:58 +0000 |
---|---|---|
committer | Kenneth Russel <[email protected]> | 2005-08-29 07:03:58 +0000 |
commit | 0a1fd96a6f3873e41dcced1c69dafd30bea3fc39 (patch) | |
tree | 829b2afc3343027d0e7bc925815640320472737c /make/build.xml | |
parent | 708a1e46c604ae2258b264903b94ae8360e2ca1f (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-demos/branches/JSR-231@116 3298f667-5e0e-4b4a-8ed4-a3559d26a5f4
Diffstat (limited to 'make/build.xml')
0 files changed, 0 insertions, 0 deletions