Re: Strange phenomenon about glDrawPixels, Any one can help me ?
Posted by george2008 on Aug 05, 2015; 9:32am
URL: https://forum.jogamp.org/Strange-phenomenon-about-glDrawPixels-Any-one-can-help-me-tp4035033p4035036.html
>Check the size of the byte array inside DataBufferByte returned by getData().
Add one line below 'getData()', the output is correct. So the size inside DataBufferByte returned by getData() is correct.
byte[] bytes = buf.getData(); // length : w*h
System.out.println(bytes.length); // output : 521256 ( = 587*888)
>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)' ?