Hello,
Please could somebody suggest some pointers on how to modify JOGL, specifically the GL class.
Specifically I need to override glTexImage2D to take a pointer in native memory as its pixel source.
glTexImage2D(texType,
0,
0,
0,
rowPixels,
height,
GL.GL_BGRA,
GL.GL_UNSIGNED_INT_8_8_8_8_REV,
pixels); // pointer to address in memory
and the associated function glTexSubImage2D.
gl.glTexSubImage2D (texType,
0,
0,
0,
rowPixels,
height,
GL.GL_BGRA,
GL.GL_UNSIGNED_INT_8_8_8_8_REV,
pixels); // pointer to address in memory
The app uses quicktime for java to render video, image data from the video is then copied into a a Buffer and passed to glTexImage2D.
ByteBuffer.wrap(gworld.getPixMap().getPixelData().getBytes());
Each copy takes a long time. I’d like to miss out the copy by passing the memory address to glTexSubImage.
QTObject.ID(gworld.getPixMap().getPixelData());
Thanks for your help.
Cheers,
Ewan