Commit f71edf22 authored by Ivan Gyurdiev's avatar Ivan Gyurdiev Committed by Alexandre Julliard

wined3d: Add D3DCOLORWRITEENABLE codes to the WINED3D namespace.

parent b1df1d83
......@@ -4237,14 +4237,14 @@ static HRESULT WINAPI IWineD3DDeviceImpl_SetRenderState(IWineD3DDevice *iface, W
case WINED3DRS_COLORWRITEENABLE :
{
TRACE("Color mask: r(%d) g(%d) b(%d) a(%d)\n",
Value & D3DCOLORWRITEENABLE_RED ? 1 : 0,
Value & D3DCOLORWRITEENABLE_GREEN ? 1 : 0,
Value & D3DCOLORWRITEENABLE_BLUE ? 1 : 0,
Value & D3DCOLORWRITEENABLE_ALPHA ? 1 : 0);
glColorMask(Value & D3DCOLORWRITEENABLE_RED ? GL_TRUE : GL_FALSE,
Value & D3DCOLORWRITEENABLE_GREEN ? GL_TRUE : GL_FALSE,
Value & D3DCOLORWRITEENABLE_BLUE ? GL_TRUE : GL_FALSE,
Value & D3DCOLORWRITEENABLE_ALPHA ? GL_TRUE : GL_FALSE);
Value & WINED3DCOLORWRITEENABLE_RED ? 1 : 0,
Value & WINED3DCOLORWRITEENABLE_GREEN ? 1 : 0,
Value & WINED3DCOLORWRITEENABLE_BLUE ? 1 : 0,
Value & WINED3DCOLORWRITEENABLE_ALPHA ? 1 : 0);
glColorMask(Value & WINED3DCOLORWRITEENABLE_RED ? GL_TRUE : GL_FALSE,
Value & WINED3DCOLORWRITEENABLE_GREEN ? GL_TRUE : GL_FALSE,
Value & WINED3DCOLORWRITEENABLE_BLUE ? GL_TRUE : GL_FALSE,
Value & WINED3DCOLORWRITEENABLE_ALPHA ? GL_TRUE : GL_FALSE);
checkGLcall("glColorMask(...)");
}
break;
......@@ -6128,10 +6128,10 @@ static HRESULT WINAPI IWineD3DDeviceImpl_Clear(IWineD3DDevice *iface, DWORD Coun
old_color_clear_value[1],
old_color_clear_value[2],
old_color_clear_value[3]);
glColorMask(This->stateBlock->renderState[WINED3DRS_COLORWRITEENABLE] & D3DCOLORWRITEENABLE_RED ? GL_TRUE : GL_FALSE,
This->stateBlock->renderState[WINED3DRS_COLORWRITEENABLE] & D3DCOLORWRITEENABLE_GREEN ? GL_TRUE : GL_FALSE,
This->stateBlock->renderState[WINED3DRS_COLORWRITEENABLE] & D3DCOLORWRITEENABLE_BLUE ? GL_TRUE : GL_FALSE,
This->stateBlock->renderState[WINED3DRS_COLORWRITEENABLE] & D3DCOLORWRITEENABLE_ALPHA ? GL_TRUE : GL_FALSE);
glColorMask(This->stateBlock->renderState[WINED3DRS_COLORWRITEENABLE] & WINED3DCOLORWRITEENABLE_RED ? GL_TRUE : GL_FALSE,
This->stateBlock->renderState[WINED3DRS_COLORWRITEENABLE] & WINED3DCOLORWRITEENABLE_GREEN ? GL_TRUE : GL_FALSE,
This->stateBlock->renderState[WINED3DRS_COLORWRITEENABLE] & WINED3DCOLORWRITEENABLE_BLUE ? GL_TRUE : GL_FALSE,
This->stateBlock->renderState[WINED3DRS_COLORWRITEENABLE] & WINED3DCOLORWRITEENABLE_ALPHA ? GL_TRUE : GL_FALSE);
}
glDisable(GL_SCISSOR_TEST);
......
......@@ -442,6 +442,11 @@ typedef enum _WINED3DRENDERSTATETYPE {
#define WINEHIGHEST_RENDER_STATE WINED3DRS_BLENDOPALPHA
/* Highest WINED3DRS_ value */
#define WINED3DCOLORWRITEENABLE_RED (1<<0)
#define WINED3DCOLORWRITEENABLE_GREEN (1<<1)
#define WINED3DCOLORWRITEENABLE_BLUE (1<<2)
#define WINED3DCOLORWRITEENABLE_ALPHA (1<<3)
typedef enum _WINED3DBLEND {
WINED3DBLEND_ZERO = 1,
WINED3DBLEND_ONE = 2,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment