Is this how alignment work? (OpenGL)
Let's say I have an array something like this,
|
unsigned char firstPixel[] = {255, 255, 255};
|
(this is single pixel)
and this is my OpenGL alignment code,
|
glPixelStorei(GL_UNPACK_ALIGNMENT, 4);
|
This is what I think how OpenGL alignment works,
1 2
|
<address-0><address-1><address-2><address-3>
<myPixel-R><myPixel-G><myPixel-B>< padding >
|
Am I correct? does alignment works with single pixel(element)? it doesn't matter how long my pixel row is,
for ex. I have a row which is 3 pixels long. It doesn't effect the alignment, does it? thanks.
Last edited on
Topic archived. No new replies allowed.