View Full Version : Are there any differences between the memory alignments?

Ehsan Kamrani
05-20-2005, 04:50 AM
glPixelStorei( GLenum pname, TYPE memoryAlignment );
The accepted values for memoryAlignment are 1,2,4,8.Some machines might move data more quickly if the data is aligned in memory on 2,4,or 8 byte boundaries. Which of them is better for current-or new- machines?

05-20-2005, 05:09 AM
Well, 8 would be the safest choice wouldn't it?

I mean, when you align something to 8 bytes, it's also automatically aligned to 4 and 2.

The question is how much memory you want to waste.

But: it's not enough to just set a value here.
You still need to ensure that the memory you use with the glTex or glBitmap functions is allocated at matching alignment.