On Tuesday, August 31, 2010 07:34:42 pm rullie [via jogamp] wrote:
>
> Hello,
> I am procedurally generating a texture and calling glTexImage1D. The last
> parameter asks for a Buffer, should I be putting in ByteBuffer? If so, is
> the second last parameter GL_UNSIGNED_BYTE? Would Byte.MAX_VALUE be
> equivalent to (GLubyte)255?
You have to use the byte, or NIO's ByteBuffer respectively
and encode the data as it would be unsigned.
http://www.darksleep.com/player/JavaAndUnsignedTypes.htmlWe use this kind of an approach all over the place ..
Hope it helps, Sven