Hi,
while trying to optimize the Java API of my bindings I found myself
with the following pitfalls for which I didn't find any clues yet.
Perhaps someone can give me a quick hint.
1. Don't know how to cleanly include OpenGL constants. For instance I
need to deal with GL_NONE. My two-step solution was to inject code to
define the (single) constant (as it is defined in
qtjambi_masterinclude.h) and then to modify the argument of the caller
function. It compiled, but I was wondering if there's a cleaner way to
do it. Possibly a better solution would be to try to import the
definitions from JOGL (i.e., "import javax.media.opengl.GL;") and then
modify the argument of the caller function accordingly (i.e.,
GL.GL_NONE). If it is possible I don't know how to achieve this. BTW
did anyone find a way to run the HelloGL.java demo which uses JOGL?
2. I don't know how to handle default parameters that are NULL
pointers. Running the generator gives me "unsupported default value
'NULL' of argument in function" warnings. I have several C++ code like
this:
Type Foo(OtherType* myPtr=NULL) {
...
if (myPtr)
<some instructions>
return ...;
else
<other instructions>
return ...;
}
All best,
Jean Pierre
On Mon, Jul 13, 2009 at 2:41 AM, Eskil Abrahamsen
Blomfeldt<[email protected]> wrote:
> Jean Pierre Charalambos wrote:
>>
>> thanks for the tip. I added #include <GL/gl.h> to my global.h. For "core"
>> do you mean the QtCore module? Didn't work with it (I also added the other
>> Qt modules like in the generatoraxample).
>>
>
> I'm not sure why that didn't work, but I'm glad you found a solution =)
>
>> Another question: Is it possible to change the java class name? Seems like
>> the typesystem documentation doesn't tell anything about it (nor the
>> generatorexample). I have a namespace: qglviewer, and tags of the form:
>> <object-type name="qglviewer::Camera" />
>> and thus the generator produces qglviewer_Camera.java. I'd prefer
>> Camera.java.
>>
>
> Yes, this feature seems to be accidentally omitted from the documentation,
> but you can use the "java-name" attribute. Like this:
>
> <object-type name="qglviewer:Camera" java-name="Camera" />
>
> -- Eskil
>
>
>
>
_______________________________________________
Qt-jambi-interest mailing list
[email protected]
http://lists.trolltech.com/mailman/listinfo/qt-jambi-interest