Commit 7528fc0d authored by Jan Zerebecki's avatar Jan Zerebecki Committed by Alexandre Julliard

wined3d: Fix stencil related render states.

parent cf8833c4
...@@ -405,7 +405,23 @@ GLenum StencilOp(DWORD op) { ...@@ -405,7 +405,23 @@ GLenum StencilOp(DWORD op) {
case D3DSTENCILOP_INCR : return GL_INCR_WRAP_EXT; case D3DSTENCILOP_INCR : return GL_INCR_WRAP_EXT;
case D3DSTENCILOP_DECR : return GL_DECR_WRAP_EXT; case D3DSTENCILOP_DECR : return GL_DECR_WRAP_EXT;
default: default:
FIXME("Invalid stencil op %ld\n", op); FIXME("Unrecognized stencil op %ld\n", op);
return GL_KEEP;
}
}
GLenum StencilFunc(DWORD func) {
switch ((D3DCMPFUNC)func) {
case D3DCMP_NEVER : return GL_NEVER;
case D3DCMP_LESS : return GL_LESS;
case D3DCMP_EQUAL : return GL_EQUAL;
case D3DCMP_LESSEQUAL : return GL_LEQUAL;
case D3DCMP_GREATER : return GL_GREATER;
case D3DCMP_NOTEQUAL : return GL_NOTEQUAL;
case D3DCMP_GREATEREQUAL : return GL_GEQUAL;
case D3DCMP_ALWAYS : return GL_ALWAYS;
default:
FIXME("Unrecognized D3DCMPFUNC value %ld\n", func);
return GL_ALWAYS; return GL_ALWAYS;
} }
} }
......
...@@ -483,7 +483,6 @@ typedef struct IWineD3DDeviceImpl ...@@ -483,7 +483,6 @@ typedef struct IWineD3DDeviceImpl
UINT srcBlend; UINT srcBlend;
UINT dstBlend; UINT dstBlend;
UINT alphafunc; UINT alphafunc;
UINT stencilfunc;
BOOL texture_shader_active; /* TODO: Confirm use is correct */ BOOL texture_shader_active; /* TODO: Confirm use is correct */
BOOL last_was_notclipped; BOOL last_was_notclipped;
...@@ -1166,6 +1165,7 @@ const char* debug_d3dpool(WINED3DPOOL pool); ...@@ -1166,6 +1165,7 @@ const char* debug_d3dpool(WINED3DPOOL pool);
/* Routines for GL <-> D3D values */ /* Routines for GL <-> D3D values */
GLenum StencilOp(DWORD op); GLenum StencilOp(DWORD op);
GLenum StencilFunc(DWORD func);
void set_tex_op(IWineD3DDevice *iface, BOOL isAlpha, int Stage, D3DTEXTUREOP op, DWORD arg1, DWORD arg2, DWORD arg3); void set_tex_op(IWineD3DDevice *iface, BOOL isAlpha, int Stage, D3DTEXTUREOP op, DWORD arg1, DWORD arg2, DWORD arg3);
void set_texture_matrix(const float *smat, DWORD flags, BOOL calculatedCoords); void set_texture_matrix(const float *smat, DWORD flags, BOOL calculatedCoords);
......
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