[D3D] Enable creation of a zbuffer in system memory
Christian Costa
titan.costa at wanadoo.fr
Mon Mar 22 16:45:41 CST 2004
Hi,
Summoner wants to create a Z buffer with the DDSCAPS_SYSTEMMEMORY flag set.
This may looks strange but this is so.
This patch makes support for this.
Now summoner works.
Changelog:
Enable creation of a zbuffer in system memory.
Christian Costa titan.costa at wanadoo.fr
-------------- next part --------------
Index: ddraw/main.c
===================================================================
RCS file: /home/wine/wine/dlls/ddraw/ddraw/main.c,v
retrieving revision 1.47
diff -u -r1.47 main.c
--- ddraw/main.c 30 Jan 2004 22:58:03 -0000 1.47
+++ ddraw/main.c 22 Mar 2004 21:34:07 -0000
@@ -631,16 +631,17 @@
/* create texture */
hr = create_texture(This, pDDSD, ppSurf, pUnkOuter);
}
+ else if ( (pDDSD->ddsCaps.dwCaps & DDSCAPS_ZBUFFER) &&
+ !(pDDSD->ddsCaps.dwCaps & DDSCAPS_OFFSCREENPLAIN)) /* Support DDSCAPS_SYSTEMMEMORY */
+ {
+ /* create z-buffer */
+ hr = This->create_zbuffer(This, pDDSD, ppSurf, pUnkOuter);
+ }
else if ((pDDSD->ddsCaps.dwCaps & DDSCAPS_OFFSCREENPLAIN) ||
(pDDSD->ddsCaps.dwCaps & DDSCAPS_SYSTEMMEMORY)) /* No difference in Wine right now */
{
/* create offscreenplain surface */
hr = create_offscreen(This, pDDSD, ppSurf, pUnkOuter);
- }
- else if (pDDSD->ddsCaps.dwCaps & DDSCAPS_ZBUFFER)
- {
- /* create z-buffer */
- hr = This->create_zbuffer(This, pDDSD, ppSurf, pUnkOuter);
}
else
{
More information about the wine-patches
mailing list