View Full Version : Question about GL_UNPACK_ALIGNMENT

09-04-2008, 07:24 AM

glPixelStorei(GL_UNPACK_ALIGNMENT, 1);

I'm using this call in order to pass correctly texture pixels,but should I set it back to default alignment after call glTexImage2D(...) or elsewhere?
In regular C code we usually change alignment before the definition of the structure and then we return it back to default...
I mean - if I don't set back - can it cause problems?


09-04-2008, 02:21 PM
I don't see any reason now to set back the default alignment value. Just set the correct alignment when you need to read or write a texture data. Default one is 4 if I am right.