Re: Strange phenomenon about glDrawPixels, Any one can help me ?
Posted by
gouessej on
Aug 05, 2015; 11:14am
URL: https://forum.jogamp.org/Strange-phenomenon-about-glDrawPixels-Any-one-can-help-me-tp4035033p4035038.html
There is probably a problem of alignment:
http://forum.jogamp.org/glTexImage2D-error-td4033393.html
george2008 wrote
>I just hope that you don't create an indirect NIO buffer at each call.
You means using 'Buffers.newDirectByteBuffer(bytes)' instead of 'ByteBuffer.wrap(bytes)' ?
I mean that you should create a direct NIO buffer with Buffers.newDirectByteBuffer() only once and reuse it. As you don't show a complete example, I don't really know what you do. If you create a new buffer at each call of GLEventListener.display(), you'll run out of memory.