Login  Register

Re: Strange phenomenon about glDrawPixels, Any one can help me ?

Posted by george2008 on Aug 07, 2015; 12:40pm
URL: https://forum.jogamp.org/Strange-phenomenon-about-glDrawPixels-Any-one-can-help-me-tp4035033p4035048.html

if set:
h = 587
w = 888
alignment = 4

using below formula, the output is '523600'
v = (h-1) * (w + (alignemnt - w % alignment)) + w
System.out.println(v);

BUT, if I use function G:Buffers.sizeof()', I got '521256', which is equal to 888*587.
int v = GLBuffers.sizeof(gl, new int[1], 1, 888, 587, 1, false);

Above two results are different,
is the formula '(h-1) * (w + (alignemnt - w % alignment)) + w'  correct ?