On 08/25/2012 01:26 AM, toxi [via jogamp] wrote:
> I know this is an old thread, but would it be possible for you to post the
> related .cfg file to generate Java classes for the structs in the julia3d
> config.h (or even better add it to the jocl-demos git repo? I've been studying
> the gluegen docs and been trying all sorts of options, but always only get
> empty classes & interfaces. Thanks a lot for all your efforts! Am creating a
> Clojure wrapper around JOCL and would love to support structs in an idiomatic
> way, but first need to study the gluegen translation/alignment logic more...
I I understand you properly here, 'idiomatic' is used for a
more natural integration of GlueGen into the JVM ?
AFAIK there is already a project to hook up
GlueGen w/ Java annotations, so it compiles c-header files to Java classes.
<
https://github.com/mbien/superglue/>
<
https://github.com/mbien/superglue/blob/master/testproject/src/foobar/StructGlueTest.java>
If your attempts of using GlueGen fail, pls have a look at GlueGen's unit tests.
They do include using GlueGen, i.e. creating function bindings and structs.
~Sven