Changelog
Opengl 1.4 added stencil wrap support as per directx (also in the
GL_EXT_stencil_wrap extension).
Jason
Note: Based off my (unapplied) dx36 patch but not including the changes
Raphael has made under dx37.
--- dlls/d3d8/device.dx36 2003-05-21 22:37:02.000000000 +0100
+++ dlls/d3d8/device.c 2003-05-24 15:44:40.000000000 +0100
@@ -1230,10 +1230,19 @@
case D3DSTENCILOP_INCRSAT : return GL_INCR;
case D3DSTENCILOP_DECRSAT : return GL_DECR;
case D3DSTENCILOP_INVERT : return GL_INVERT;
+
+#if defined(GL_VERSION_1_4)
+ case D3DSTENCILOP_INCR : return GL_INCR_WRAP;
+ case D3DSTENCILOP_DECR : return GL_DECR_WRAP;
+#elif defined(GL_EXT_stencil_wrap)
+ case D3DSTENCILOP_INCR : return GL_INCR_WRAP_EXT;
+ case D3DSTENCILOP_DECR : return GL_DECR_WRAP_EXT;
+#else
case D3DSTENCILOP_INCR : FIXME("Unsupported stencil op D3DSTENCILOP_INCR\n");
return GL_INCR; /* Fixme - needs to support wrap */
case D3DSTENCILOP_DECR : FIXME("Unsupported stencil op D3DSTENCILOP_DECR\n");
return GL_DECR; /* Fixme - needs to support wrap */
+#endif
default:
FIXME("Invalid stencil op %ld\n", op);
return GL_ALWAYS;
Index: dlls/d3d8/directx.c
===================================================================
RCS file: /home/wine/wine/dlls/d3d8/directx.c,v
retrieving revision 1.34
diff -u -r1.34 directx.c
--- dlls/d3d8/directx.c 17 May 2003 18:33:02 -0000 1.34
+++ dlls/d3d8/directx.c 24 May 2003 14:15:03 -0000
@@ -403,8 +403,6 @@
ICOM_THIS(IDirect3D8Impl,iface);
TRACE("(%p)->(Adptr:%d, DevType: %x, pCaps: %p)\n", This, Adapter, DeviceType, pCaps);
-
- /* NOTE: Most of the values here are complete garbage for now */
pCaps->DeviceType = (DeviceType == D3DDEVTYPE_HAL) ? D3DDEVTYPE_HAL : D3DDEVTYPE_REF; /* Not quite true, but use h/w supported by opengl I suppose */
pCaps->AdapterOrdinal = Adapter;
@@ -440,8 +438,6 @@
pCaps->LineCaps = D3DLINECAPS_TEXTURE | D3DLINECAPS_ZTEST;
- /*pCaps->MaxTextureWidth = 16384;
- pCaps->MaxTextureHeight = 16384;*/
{
GLint gl_tex_size;
glGetIntegerv(GL_MAX_TEXTURE_SIZE, &gl_tex_size);
@@ -465,7 +461,10 @@
pCaps->StencilCaps = D3DSTENCILCAPS_DECRSAT | D3DSTENCILCAPS_INCRSAT |
D3DSTENCILCAPS_INVERT | D3DSTENCILCAPS_KEEP |
- D3DSTENCILCAPS_REPLACE | D3DSTENCILCAPS_ZERO /* | D3DSTENCILCAPS_DECR | D3DSTENCILCAPS_INCR */;
+ D3DSTENCILCAPS_REPLACE | D3DSTENCILCAPS_ZERO;
+#if defined(GL_VERSION_1_4) || defined(GL_EXT_stencil_wrap)
+ pCaps->StencilCaps |= D3DSTENCILCAPS_DECR | D3DSTENCILCAPS_INCR;
+#endif
pCaps->FVFCaps = D3DFVFCAPS_PSIZE | 0x80000;