Henri Verbeet : wined3d: Use D3DCOLORTOGLFLOAT4 in drawStridedSlow().
Alexandre Julliard
julliard at wine.codeweavers.com
Wed Mar 9 08:05:55 CST 2016
Module: wine
Branch: master
Commit: 357e7b759fc4db6875f973ac7656ba85ed05965a
URL: http://source.winehq.org/git/wine.git/?a=commit;h=357e7b759fc4db6875f973ac7656ba85ed05965a
Author: Henri Verbeet <hverbeet at codeweavers.com>
Date: Tue Mar 8 15:51:11 2016 +0100
wined3d: Use D3DCOLORTOGLFLOAT4 in drawStridedSlow().
Signed-off-by: Henri Verbeet <hverbeet at codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>
---
dlls/wined3d/drawprim.c | 7 +------
1 file changed, 1 insertion(+), 6 deletions(-)
diff --git a/dlls/wined3d/drawprim.c b/dlls/wined3d/drawprim.c
index c95f92d..64b8012 100644
--- a/dlls/wined3d/drawprim.c
+++ b/dlls/wined3d/drawprim.c
@@ -291,15 +291,10 @@ static void drawStridedSlow(const struct wined3d_device *device, struct wined3d_
if (num_untracked_materials)
{
- DWORD diffuseColor = ((const DWORD *)ptrToCoords)[0];
unsigned char i;
float color[4];
- color[0] = D3DCOLOR_B_R(diffuseColor) / 255.0f;
- color[1] = D3DCOLOR_B_G(diffuseColor) / 255.0f;
- color[2] = D3DCOLOR_B_B(diffuseColor) / 255.0f;
- color[3] = D3DCOLOR_B_A(diffuseColor) / 255.0f;
-
+ D3DCOLORTOGLFLOAT4(*(const DWORD *)ptrToCoords, color);
for (i = 0; i < num_untracked_materials; ++i)
{
gl_info->gl_ops.gl.p_glMaterialfv(GL_FRONT_AND_BACK, context->untracked_materials[i], color);
More information about the wine-cvs
mailing list