this patch adds support for WINED3DFMT_A8B8G8R8 to wined3d. this fixes the
textures in the Demo_Grass, Demo_Smoke and the logo for all demos in OGRE
1.0.6 [1] demos using dx9 renderer.
--
cu
License: LGPL
ChangeLog:
2006-01-24 Christoph Frick
frick@sc-networks.com
* dlls/wined3d/utils.c:
wined3d: Support for WINED3DFMT_A8B8G8R8
--- dlls/wined3d/utils.c.orig 2005-11-26 09:31:21.000000000 +0100
+++ dlls/wined3d/utils.c 2006-01-23 22:19:14.000000000 +0100
@@ -35,6 +35,7 @@
FMT_TO_STR(WINED3DFMT_UNKNOWN);
FMT_TO_STR(WINED3DFMT_R8G8B8);
FMT_TO_STR(WINED3DFMT_A8R8G8B8);
+ FMT_TO_STR(WINED3DFMT_A8B8G8R8);
FMT_TO_STR(WINED3DFMT_X8R8G8B8);
FMT_TO_STR(WINED3DFMT_R5G6B5);
FMT_TO_STR(WINED3DFMT_X1R5G5B5);
@@ -1613,6 +1614,7 @@
case WINED3DFMT_A8R8G8B8: retVal = GL_RGBA8; break;
case WINED3DFMT_A2R10G10B10: retVal = GL_RGBA8; break;
case WINED3DFMT_X8R8G8B8: retVal = GL_RGB; break;
+ case WINED3DFMT_A8B8G8R8: retVal = GL_RGBA8; break;
/* to see */
case WINED3DFMT_A8: retVal = GL_ALPHA8; break;
@@ -1678,6 +1680,7 @@
case WINED3DFMT_A8R8G8B8: retVal = GL_BGRA; break;
case WINED3DFMT_A2R10G10B10: retVal = GL_BGRA; break;
case WINED3DFMT_X8R8G8B8: retVal = GL_BGRA; break;
+ case WINED3DFMT_A8B8G8R8: retVal = GL_RGBA; break;
/* to see */
case WINED3DFMT_A8: retVal = GL_ALPHA; break;
/* Depth + Stencil */
@@ -1740,6 +1743,7 @@
case WINED3DFMT_A8R8G8B8: retVal = GL_UNSIGNED_INT_8_8_8_8_REV; break;
case WINED3DFMT_A2R10G10B10: retVal = GL_UNSIGNED_INT_2_10_10_10_REV; break;
case WINED3DFMT_X8R8G8B8: retVal = GL_UNSIGNED_INT_8_8_8_8_REV; break;
+ case WINED3DFMT_A8B8G8R8: retVal = GL_UNSIGNED_INT_8_8_8_8_REV; break;
/* to see */
case WINED3DFMT_A8: retVal = GL_ALPHA; break;
/* Depth + Stencil */
@@ -1783,6 +1787,7 @@
case WINED3DFMT_A8R8G8B8: retVal = 4; break;
case WINED3DFMT_A2R10G10B10: retVal = 4; break;
case WINED3DFMT_X8R8G8B8: retVal = 4; break;
+ case WINED3DFMT_A8B8G8R8: retVal = 4; break;
/* Paletted */
case WINED3DFMT_P8: retVal = 1; break;
case WINED3DFMT_A8P8: retVal = 2; break;