[WINED3D] Flip red/blue for R8G8B8 format.
hverbeet at gmail.com
Sun May 7 04:06:01 CDT 2006
On 06/05/06, Ivan Gyurdiev <ivg2 at cornell.edu> wrote:
> [ applies on top of Mike's tree, but hopefully on the main tree too ]
> R8G8B8 means red is the most significant bit.
> On a little-endian system, the texture is stored starting with blue.
> It is read byte-by-byte (GL_UNSIGNED_BYTE), therefore it needs to be
> flipped to GL_BGR.
> This makes Demo #2 (texture mapping:
> http://www.zanir.szm.sk/dx00-09.html) show the correct colors.
> Also, in HL2, it makes Barney's face human color (previously it was blue).
> I think Stefan Dosinger saw improvement on some other demos.
There might be more to this. This was changed the other way around not
too long ago. See
It might just be that the glDrawPixels call should've been changed
instead last time. (Shouldn't those simply use the format in
This->glDescription.glFormat in the first place?)
More information about the wine-devel