wined3d: Add D3DBLEND to the WINED3D namespace.

This commit is contained in:
Ivan Gyurdiev 2006-10-24 06:05:39 -04:00 committed by Alexandre Julliard
parent 4f611bc0e0
commit 10cbffb335
3 changed files with 38 additions and 19 deletions

View file

@ -3585,29 +3585,29 @@ static HRESULT WINAPI IWineD3DDeviceImpl_SetRenderState(IWineD3DDevice *iface, W
{
int newVal = GL_ZERO;
switch (Value) {
case D3DBLEND_ZERO : newVal = GL_ZERO; break;
case D3DBLEND_ONE : newVal = GL_ONE; break;
case D3DBLEND_SRCCOLOR : newVal = GL_SRC_COLOR; break;
case D3DBLEND_INVSRCCOLOR : newVal = GL_ONE_MINUS_SRC_COLOR; break;
case D3DBLEND_SRCALPHA : newVal = GL_SRC_ALPHA; break;
case D3DBLEND_INVSRCALPHA : newVal = GL_ONE_MINUS_SRC_ALPHA; break;
case D3DBLEND_DESTALPHA : newVal = GL_DST_ALPHA; break;
case D3DBLEND_INVDESTALPHA : newVal = GL_ONE_MINUS_DST_ALPHA; break;
case D3DBLEND_DESTCOLOR : newVal = GL_DST_COLOR; break;
case D3DBLEND_INVDESTCOLOR : newVal = GL_ONE_MINUS_DST_COLOR; break;
case D3DBLEND_SRCALPHASAT : newVal = GL_SRC_ALPHA_SATURATE; break;
case WINED3DBLEND_ZERO : newVal = GL_ZERO; break;
case WINED3DBLEND_ONE : newVal = GL_ONE; break;
case WINED3DBLEND_SRCCOLOR : newVal = GL_SRC_COLOR; break;
case WINED3DBLEND_INVSRCCOLOR : newVal = GL_ONE_MINUS_SRC_COLOR; break;
case WINED3DBLEND_SRCALPHA : newVal = GL_SRC_ALPHA; break;
case WINED3DBLEND_INVSRCALPHA : newVal = GL_ONE_MINUS_SRC_ALPHA; break;
case WINED3DBLEND_DESTALPHA : newVal = GL_DST_ALPHA; break;
case WINED3DBLEND_INVDESTALPHA : newVal = GL_ONE_MINUS_DST_ALPHA; break;
case WINED3DBLEND_DESTCOLOR : newVal = GL_DST_COLOR; break;
case WINED3DBLEND_INVDESTCOLOR : newVal = GL_ONE_MINUS_DST_COLOR; break;
case WINED3DBLEND_SRCALPHASAT : newVal = GL_SRC_ALPHA_SATURATE; break;
case D3DBLEND_BOTHSRCALPHA : newVal = GL_SRC_ALPHA;
case WINED3DBLEND_BOTHSRCALPHA : newVal = GL_SRC_ALPHA;
This->srcBlend = newVal;
This->dstBlend = newVal;
break;
case D3DBLEND_BOTHINVSRCALPHA : newVal = GL_ONE_MINUS_SRC_ALPHA;
case WINED3DBLEND_BOTHINVSRCALPHA : newVal = GL_ONE_MINUS_SRC_ALPHA;
This->srcBlend = newVal;
This->dstBlend = newVal;
break;
case D3DBLEND_BLENDFACTOR : newVal = GL_CONSTANT_COLOR; break;
case D3DBLEND_INVBLENDFACTOR : newVal = GL_ONE_MINUS_CONSTANT_COLOR; break;
case WINED3DBLEND_BLENDFACTOR : newVal = GL_CONSTANT_COLOR; break;
case WINED3DBLEND_INVBLENDFACTOR : newVal = GL_ONE_MINUS_CONSTANT_COLOR; break;
default:
FIXME("Unrecognized src/dest blend value %d (%d)\n", Value, State);
}

View file

@ -851,8 +851,8 @@ static HRESULT WINAPI IWineD3DStateBlockImpl_InitStartupStateBlock(IWineD3DStat
IWineD3DDevice_SetRenderState(device, WINED3DRS_ZWRITEENABLE, TRUE);
IWineD3DDevice_SetRenderState(device, WINED3DRS_ALPHATESTENABLE, FALSE);
IWineD3DDevice_SetRenderState(device, WINED3DRS_LASTPIXEL, TRUE);
IWineD3DDevice_SetRenderState(device, WINED3DRS_SRCBLEND, D3DBLEND_ONE);
IWineD3DDevice_SetRenderState(device, WINED3DRS_DESTBLEND, D3DBLEND_ZERO);
IWineD3DDevice_SetRenderState(device, WINED3DRS_SRCBLEND, WINED3DBLEND_ONE);
IWineD3DDevice_SetRenderState(device, WINED3DRS_DESTBLEND, WINED3DBLEND_ZERO);
IWineD3DDevice_SetRenderState(device, WINED3DRS_CULLMODE, D3DCULL_CCW);
IWineD3DDevice_SetRenderState(device, WINED3DRS_ZFUNC, D3DCMP_LESSEQUAL);
IWineD3DDevice_SetRenderState(device, WINED3DRS_ALPHAFUNC, D3DCMP_ALWAYS);
@ -973,8 +973,8 @@ static HRESULT WINAPI IWineD3DStateBlockImpl_InitStartupStateBlock(IWineD3DStat
IWineD3DDevice_SetRenderState(device, WINED3DRS_WRAP14, 0);
IWineD3DDevice_SetRenderState(device, WINED3DRS_WRAP15, 0);
IWineD3DDevice_SetRenderState(device, WINED3DRS_SEPARATEALPHABLENDENABLE, FALSE);
IWineD3DDevice_SetRenderState(device, WINED3DRS_SRCBLENDALPHA, D3DBLEND_ONE);
IWineD3DDevice_SetRenderState(device, WINED3DRS_DESTBLENDALPHA, D3DBLEND_ZERO);
IWineD3DDevice_SetRenderState(device, WINED3DRS_SRCBLENDALPHA, WINED3DBLEND_ONE);
IWineD3DDevice_SetRenderState(device, WINED3DRS_DESTBLENDALPHA, WINED3DBLEND_ZERO);
IWineD3DDevice_SetRenderState(device, WINED3DRS_BLENDOPALPHA, D3DBLENDOP_ADD);
/* clipping status */

View file

@ -442,6 +442,25 @@ typedef enum _WINED3DRENDERSTATETYPE {
#define WINEHIGHEST_RENDER_STATE WINED3DRS_BLENDOPALPHA
/* Highest WINED3DRS_ value */
typedef enum _WINED3DBLEND {
WINED3DBLEND_ZERO = 1,
WINED3DBLEND_ONE = 2,
WINED3DBLEND_SRCCOLOR = 3,
WINED3DBLEND_INVSRCCOLOR = 4,
WINED3DBLEND_SRCALPHA = 5,
WINED3DBLEND_INVSRCALPHA = 6,
WINED3DBLEND_DESTALPHA = 7,
WINED3DBLEND_INVDESTALPHA = 8,
WINED3DBLEND_DESTCOLOR = 9,
WINED3DBLEND_INVDESTCOLOR = 10,
WINED3DBLEND_SRCALPHASAT = 11,
WINED3DBLEND_BOTHSRCALPHA = 12,
WINED3DBLEND_BOTHINVSRCALPHA = 13,
WINED3DBLEND_BLENDFACTOR = 14,
WINED3DBLEND_INVBLENDFACTOR = 15,
WINED3DBLEND_FORCE_DWORD = 0x7fffffff
} WINED3DBLEND;
typedef enum _WINED3DVERTEXBLENDFLAGS {
WINED3DVBF_DISABLE = 0,
WINED3DVBF_1WEIGHTS = 1,