[1.2]-Windows&Linux(GL_RGBA)-OSX(GL_BGRA)?

Hi,

When using:
OpenGL “glTexImage2D” function:
On Windows and Linux, I must use:
GL_RGBA
but on Mac OS X, I must use:
GL_BGRA
for format of pixel data value in above function.

Was wondering why?

Thanks!

Jesse

because the endiannes of these systems isn’t the same
windows and linux (intel architectures - x86 and next) are little endian
macs (ppc architecture) are big endian

The endianess shouldn’t matter as long as you supply the correct color
enums to glTexImage2D OpenGL will perform the necessary conversions.
Perhaps the reading of your color data from disk isn’t correct on a
system with different endianness.

PaulOn 09/13/10 17:12, Net_Raider wrote:

because the endiannes of these systems isn’t the same
windows and linux (intel architectures - x86 and next) are little endian
macs (ppc architecture) are big endian