Aric Cyr : wined3d: Reverse GL_BGR to GL_RGB for the D3D RGB formats.

Alexandre Julliard julliard at wine.codeweavers.com
Thu Mar 2 05:17:32 CST 2006


Module: wine
Branch: refs/heads/master
Commit: 252c4adb965a26db19c1c9161c40a82b488cb6d4
URL:    http://source.winehq.org/git/?p=wine.git;a=commit;h=252c4adb965a26db19c1c9161c40a82b488cb6d4

Author: Aric Cyr <aric.cyr at gmail.com>
Date:   Thu Mar  2 00:45:42 2006 +0900

wined3d: Reverse GL_BGR to GL_RGB for the D3D RGB formats.
This fixes texture colours in many D3D games (verified with Age Of Mythology).

---

 dlls/wined3d/utils.c |    6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/dlls/wined3d/utils.c b/dlls/wined3d/utils.c
index 90a8292..53a9533 100644
--- a/dlls/wined3d/utils.c
+++ b/dlls/wined3d/utils.c
@@ -1703,9 +1703,9 @@ GLenum D3DFmt2GLFmt(IWineD3DDeviceImpl* 
         case WINED3DFMT_Q8W8V8U8:         retVal = GL_RGBA; break;
         case WINED3DFMT_Q16W16V16U16:     retVal = GL_COLOR_INDEX; break;
             /* color buffer */
-        case WINED3DFMT_R3G3B2:           retVal = GL_BGR; break;
-        case WINED3DFMT_R5G6B5:           retVal = GL_BGR; break;
-        case WINED3DFMT_R8G8B8:           retVal = GL_BGR; break;
+        case WINED3DFMT_R3G3B2:           retVal = GL_RGB; break;
+        case WINED3DFMT_R5G6B5:           retVal = GL_RGB; break;
+        case WINED3DFMT_R8G8B8:           retVal = GL_RGB; break;
         case WINED3DFMT_A1R5G5B5:         retVal = GL_BGRA; break;
         case WINED3DFMT_X1R5G5B5:         retVal = GL_BGRA; break;
         case WINED3DFMT_A4R4G4B4:         retVal = GL_BGRA; break;




More information about the wine-cvs mailing list