[cairo] ARGB, BGRA, RGBA mess

Bill Spitzak spitzak at d2.com
Thu Jan 13 14:41:32 PST 2005


I also should point out that OpenGL clearly thinks the term "RGBA" means 
that R is in the byte with the lowest address. This is despite the fact 
that OpenGL was designed on a big-endian (mips) processor, when it was 
ported to Intel the designers clearly believed that RGBA meant this.

It appears that OpenGL supports (in the glDrawPixels call) formats 
called GL_RGB, GL_RGBA, GL_BGR, GL_BGRA, and GL_ABGR_EXT, though the 
documentation only describes GL_RGB and GL_RGBA. In all cases the 
letters indicate the order of the values in memory.

In addition having "RGBA" describe anything other than the order of 
bytes in memory is pretty useless if you want to describe data larger 
than bytes, such as 16-bit or float or half (16-bit floats).




More information about the cairo mailing list