I'm doing some stuff with OpenGL in Java using JOGL and I came across something that surprised me.
There is two glReadPixel functions that points to the same C implementation.
The first one is :
glReadPixels(int x, int y, int width, int height, int format, int type, Buffer pixels)
I understand how it works compared to the C binding but the second one :
glReadPixels(int x, int y, int width, int height, int format, int type, long pixels_buffer_offset)
How can it convert a void* to a long ? Are we really getting the pixels within a long ?
I really do not understand the second binding. I have done some googling and I just found out everyone is using the first one ...