Commit 2b6deb86 authored by Ivan Gyurdiev's avatar Ivan Gyurdiev Committed by Alexandre Julliard

wined3d: Add D3DSTENCILOP to the WINED3D namespace.

parent f5cc6128
......@@ -874,9 +874,9 @@ static HRESULT WINAPI IWineD3DStateBlockImpl_InitStartupStateBlock(IWineD3DStat
IWineD3DDevice_SetRenderState(device, WINED3DRS_ZBIAS, 0);
IWineD3DDevice_SetRenderState(device, WINED3DRS_RANGEFOGENABLE, FALSE);
IWineD3DDevice_SetRenderState(device, WINED3DRS_STENCILENABLE, FALSE);
IWineD3DDevice_SetRenderState(device, WINED3DRS_STENCILFAIL, D3DSTENCILOP_KEEP);
IWineD3DDevice_SetRenderState(device, WINED3DRS_STENCILZFAIL, D3DSTENCILOP_KEEP);
IWineD3DDevice_SetRenderState(device, WINED3DRS_STENCILPASS, D3DSTENCILOP_KEEP);
IWineD3DDevice_SetRenderState(device, WINED3DRS_STENCILFAIL, WINED3DSTENCILOP_KEEP);
IWineD3DDevice_SetRenderState(device, WINED3DRS_STENCILZFAIL, WINED3DSTENCILOP_KEEP);
IWineD3DDevice_SetRenderState(device, WINED3DRS_STENCILPASS, WINED3DSTENCILOP_KEEP);
/* Setting stencil func also uses values for stencil ref/mask, so manually set defaults
* so only a single call performed (and ensure defaults initialized before making that call)
......@@ -954,9 +954,9 @@ static HRESULT WINAPI IWineD3DStateBlockImpl_InitStartupStateBlock(IWineD3DStat
IWineD3DDevice_SetRenderState(device, WINED3DRS_ADAPTIVETESS_W, tmpfloat.d);
IWineD3DDevice_SetRenderState(device, WINED3DRS_ENABLEADAPTIVETESSELLATION, FALSE);
IWineD3DDevice_SetRenderState(device, WINED3DRS_TWOSIDEDSTENCILMODE, FALSE);
IWineD3DDevice_SetRenderState(device, WINED3DRS_CCW_STENCILFAIL, D3DSTENCILOP_KEEP);
IWineD3DDevice_SetRenderState(device, WINED3DRS_CCW_STENCILZFAIL, D3DSTENCILOP_KEEP);
IWineD3DDevice_SetRenderState(device, WINED3DRS_CCW_STENCILPASS, D3DSTENCILOP_KEEP);
IWineD3DDevice_SetRenderState(device, WINED3DRS_CCW_STENCILFAIL, WINED3DSTENCILOP_KEEP);
IWineD3DDevice_SetRenderState(device, WINED3DRS_CCW_STENCILZFAIL, WINED3DSTENCILOP_KEEP);
IWineD3DDevice_SetRenderState(device, WINED3DRS_CCW_STENCILPASS, WINED3DSTENCILOP_KEEP);
IWineD3DDevice_SetRenderState(device, WINED3DRS_CCW_STENCILFUNC, D3DCMP_ALWAYS);
IWineD3DDevice_SetRenderState(device, WINED3DRS_COLORWRITEENABLE1, 0x0000000F);
IWineD3DDevice_SetRenderState(device, WINED3DRS_COLORWRITEENABLE2, 0x0000000F);
......
......@@ -651,14 +651,14 @@ const char* debug_d3dpool(WINED3DPOOL Pool) {
*/
GLenum StencilOp(DWORD op) {
switch(op) {
case D3DSTENCILOP_KEEP : return GL_KEEP;
case D3DSTENCILOP_ZERO : return GL_ZERO;
case D3DSTENCILOP_REPLACE : return GL_REPLACE;
case D3DSTENCILOP_INCRSAT : return GL_INCR;
case D3DSTENCILOP_DECRSAT : return GL_DECR;
case D3DSTENCILOP_INVERT : return GL_INVERT;
case D3DSTENCILOP_INCR : return GL_INCR_WRAP_EXT;
case D3DSTENCILOP_DECR : return GL_DECR_WRAP_EXT;
case WINED3DSTENCILOP_KEEP : return GL_KEEP;
case WINED3DSTENCILOP_ZERO : return GL_ZERO;
case WINED3DSTENCILOP_REPLACE : return GL_REPLACE;
case WINED3DSTENCILOP_INCRSAT : return GL_INCR;
case WINED3DSTENCILOP_DECRSAT : return GL_DECR;
case WINED3DSTENCILOP_INVERT : return GL_INVERT;
case WINED3DSTENCILOP_INCR : return GL_INCR_WRAP_EXT;
case WINED3DSTENCILOP_DECR : return GL_DECR_WRAP_EXT;
default:
FIXME("Unrecognized stencil op %d\n", op);
return GL_KEEP;
......
......@@ -521,6 +521,19 @@ typedef enum _WINED3DCULL {
WINED3DCULL_FORCE_DWORD = 0x7fffffff
} WINED3DCULL;
typedef enum _WINED3DSTENCILOP {
WINED3DSTENCILOP_KEEP = 1,
WINED3DSTENCILOP_ZERO = 2,
WINED3DSTENCILOP_REPLACE = 3,
WINED3DSTENCILOP_INCRSAT = 4,
WINED3DSTENCILOP_DECRSAT = 5,
WINED3DSTENCILOP_INVERT = 6,
WINED3DSTENCILOP_INCR = 7,
WINED3DSTENCILOP_DECR = 8,
WINED3DSTENCILOP_FORCE_DWORD = 0x7fffffff
} WINED3DSTENCILOP;
typedef struct _WINED3DDISPLAYMODE {
UINT Width;
UINT Height;
......
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