Enable creation of a zbuffer in system memory.

This commit is contained in:
Christian Costa 2004-03-22 22:57:30 +00:00 committed by Alexandre Julliard
parent b9e542fd8e
commit bfeca3bff9
1 changed files with 6 additions and 5 deletions

View File

@ -631,17 +631,18 @@ Main_DirectDraw_CreateSurface(LPDIRECTDRAW7 iface, LPDDSURFACEDESC2 pDDSD,
/* 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
{
/* Otherwise, assume offscreenplain surface */