wined3d: Add D3DBLENDOP to the WINED3D namespace.

This commit is contained in:
Ivan Gyurdiev 2006-10-29 21:42:14 -05:00 committed by Alexandre Julliard
parent 4eced8ea24
commit 042fa7be8b
3 changed files with 19 additions and 9 deletions

View File

@ -3716,14 +3716,14 @@ static HRESULT WINAPI IWineD3DDeviceImpl_SetRenderState(IWineD3DDevice *iface, W
{ {
int glParm = GL_FUNC_ADD; int glParm = GL_FUNC_ADD;
switch ((D3DBLENDOP) Value) { switch ((WINED3DBLENDOP) Value) {
case D3DBLENDOP_ADD : glParm = GL_FUNC_ADD; break; case WINED3DBLENDOP_ADD : glParm = GL_FUNC_ADD; break;
case D3DBLENDOP_SUBTRACT : glParm = GL_FUNC_SUBTRACT; break; case WINED3DBLENDOP_SUBTRACT : glParm = GL_FUNC_SUBTRACT; break;
case D3DBLENDOP_REVSUBTRACT : glParm = GL_FUNC_REVERSE_SUBTRACT; break; case WINED3DBLENDOP_REVSUBTRACT : glParm = GL_FUNC_REVERSE_SUBTRACT; break;
case D3DBLENDOP_MIN : glParm = GL_MIN; break; case WINED3DBLENDOP_MIN : glParm = GL_MIN; break;
case D3DBLENDOP_MAX : glParm = GL_MAX; break; case WINED3DBLENDOP_MAX : glParm = GL_MAX; break;
default: default:
FIXME("Unrecognized/Unhandled D3DBLENDOP value %d\n", Value); FIXME("Unrecognized/Unhandled WINED3DBLENDOP value %d\n", Value);
} }
if(GL_SUPPORT(EXT_BLEND_MINMAX)) { if(GL_SUPPORT(EXT_BLEND_MINMAX)) {

View File

@ -935,7 +935,7 @@ static HRESULT WINAPI IWineD3DStateBlockImpl_InitStartupStateBlock(IWineD3DStat
IWineD3DDevice_SetRenderState(device, WINED3DRS_COLORWRITEENABLE, 0x0000000F); IWineD3DDevice_SetRenderState(device, WINED3DRS_COLORWRITEENABLE, 0x0000000F);
tmpfloat.f = 0.0f; tmpfloat.f = 0.0f;
IWineD3DDevice_SetRenderState(device, WINED3DRS_TWEENFACTOR, tmpfloat.d); IWineD3DDevice_SetRenderState(device, WINED3DRS_TWEENFACTOR, tmpfloat.d);
IWineD3DDevice_SetRenderState(device, WINED3DRS_BLENDOP, D3DBLENDOP_ADD); IWineD3DDevice_SetRenderState(device, WINED3DRS_BLENDOP, WINED3DBLENDOP_ADD);
IWineD3DDevice_SetRenderState(device, WINED3DRS_POSITIONDEGREE, WINED3DDEGREE_CUBIC); IWineD3DDevice_SetRenderState(device, WINED3DRS_POSITIONDEGREE, WINED3DDEGREE_CUBIC);
IWineD3DDevice_SetRenderState(device, WINED3DRS_NORMALDEGREE, WINED3DDEGREE_LINEAR); IWineD3DDevice_SetRenderState(device, WINED3DRS_NORMALDEGREE, WINED3DDEGREE_LINEAR);
/* states new in d3d9 */ /* states new in d3d9 */
@ -975,7 +975,7 @@ static HRESULT WINAPI IWineD3DStateBlockImpl_InitStartupStateBlock(IWineD3DStat
IWineD3DDevice_SetRenderState(device, WINED3DRS_SEPARATEALPHABLENDENABLE, FALSE); IWineD3DDevice_SetRenderState(device, WINED3DRS_SEPARATEALPHABLENDENABLE, FALSE);
IWineD3DDevice_SetRenderState(device, WINED3DRS_SRCBLENDALPHA, WINED3DBLEND_ONE); IWineD3DDevice_SetRenderState(device, WINED3DRS_SRCBLENDALPHA, WINED3DBLEND_ONE);
IWineD3DDevice_SetRenderState(device, WINED3DRS_DESTBLENDALPHA, WINED3DBLEND_ZERO); IWineD3DDevice_SetRenderState(device, WINED3DRS_DESTBLENDALPHA, WINED3DBLEND_ZERO);
IWineD3DDevice_SetRenderState(device, WINED3DRS_BLENDOPALPHA, D3DBLENDOP_ADD); IWineD3DDevice_SetRenderState(device, WINED3DRS_BLENDOPALPHA, WINED3DBLENDOP_ADD);
/* clipping status */ /* clipping status */
This->clip_status.ClipUnion = 0; This->clip_status.ClipUnion = 0;

View File

@ -461,6 +461,16 @@ typedef enum _WINED3DBLEND {
WINED3DBLEND_FORCE_DWORD = 0x7fffffff WINED3DBLEND_FORCE_DWORD = 0x7fffffff
} WINED3DBLEND; } WINED3DBLEND;
typedef enum _WINED3DBLENDOP {
WINED3DBLENDOP_ADD = 1,
WINED3DBLENDOP_SUBTRACT = 2,
WINED3DBLENDOP_REVSUBTRACT = 3,
WINED3DBLENDOP_MIN = 4,
WINED3DBLENDOP_MAX = 5,
WINED3DBLENDOP_FORCE_DWORD = 0x7fffffff
} WINED3DBLENDOP;
typedef enum _WINED3DVERTEXBLENDFLAGS { typedef enum _WINED3DVERTEXBLENDFLAGS {
WINED3DVBF_DISABLE = 0, WINED3DVBF_DISABLE = 0,
WINED3DVBF_1WEIGHTS = 1, WINED3DVBF_1WEIGHTS = 1,