gluUnproject

Can jruby handle java functions, which modify a passed-in array? I
have a JOGL function called gluUnproject, where the last parameter is
a java array that’s filled by the function. It could be something
else, but it seems that this array is never being filled. I’m
wondering if jruby converts it to something else before sending it to
the function, so my original array isn’t being filled on my end as
it’s always zeroed out. Is this possible?

Here’s the api for gluUnproject…
GLU (JOGL, NativeWindow and NEWT APIs)(double,
double, double, double[], int, double[], int, int[], int, double[],
int)

And the last array I’m passing the function is a java double array…

world = Java::double[4].new

I think this might be a bug in the Ruby array → Java array conversion
logic. As you describe, we might be converting and the results set in
the array never make it back to your original array. Can you file a
bug at http://bugs.jruby.org?

/Nick

On Tue, Oct 19, 2010 at 10:09 PM, Josh S.