Hello,
I have an application which would be very hard to restructure to just
use glDrawArrays, so I've been forced to use glDrawElements instead.
The third parameter for glDrawElements has to be one of either
GL_UNSIGNED_BYTE, GL_UNSIGNED_SHORT or GL_UNSIGNED_INT.
Java doesn't have any unsigned data types, so this method dies a death
when the signed data is read as unsigned, it becomes massive and the
native code tries to read beyond the end of the array.
Or at least thats what I think is happening. I can't find any examples
in the demos that use glDrawElements: is this because it doesn't work?
I've had this problem before with native code: when pulling values out
of the opengl buffers they come back as unsigned data, which i've then
had to convert into signed again. Do I always have to do this? Couldn't
you put it into the native code?
Hope I'm not hugely missing the point here!
Thanks,
Pete
********************************************************************
This email and any attachments are confidential to the intended
recipient and may also be privileged. If you are not the intended
recipient please delete it from your system and notify the sender.
You should not copy it or use it for any purpose nor disclose or
distribute its contents to any other person.
********************************************************************
|