Hi all, This patch add enumeration of one dummy Z buffer format... This is enough to fool most applications (ie the ones that do NOT lock the Z Buffer). Changelog: - add enumeration of ZBuffer format -- Lionel Ulmer - http://www.bbrox.org/
Index: dlls/ddraw/direct3d/mesa.c =================================================================== RCS file: /home/wine/wine/dlls/ddraw/direct3d/mesa.c,v retrieving revision 1.15 diff -u -r1.15 mesa.c --- dlls/ddraw/direct3d/mesa.c 24 Nov 2002 22:33:41 -0000 1.15 +++ dlls/ddraw/direct3d/mesa.c 28 Nov 2002 21:30:56 -0000 @@ -267,6 +267,32 @@ return d3ddevice_find(This, lpD3DDFS, lpD3DFDR, 3); } +HRESULT WINAPI +GL_IDirect3DImpl_7_3T_EnumZBufferFormats(LPDIRECT3D7 iface, + REFCLSID riidDevice, + LPD3DENUMPIXELFORMATSCALLBACK lpEnumCallback, + LPVOID lpContext) +{ + ICOM_THIS_FROM(IDirect3DImpl, IDirect3D7, iface); + DDPIXELFORMAT pformat; + + TRACE("(%p/%p)->(%s,%p,%p)\n", This, iface, debugstr_guid(riidDevice), lpEnumCallback, lpContext); + + memset(&pformat, 0, sizeof(pformat)); + pformat.dwSize = sizeof(DDPIXELFORMAT); + pformat.dwFourCC = 0; + TRACE("Enumerating dummy ZBuffer format (16 bits)\n"); + pformat.dwFlags = DDPF_ZBUFFER; + pformat.u1.dwZBufferBitDepth = 16; + pformat.u3.dwZBitMask = 0x0000FFFF; + pformat.u5.dwRGBZBitMask = 0x0000FFFF; + + /* Whatever the return value, stop here.. */ + lpEnumCallback(&pformat, lpContext); + + return D3D_OK; +} + static void light_released(IDirect3DImpl *This, GLenum light_num) { IDirect3DGLImpl *glThis = (IDirect3DGLImpl *) This; @@ -288,7 +314,7 @@ XCAST(EnumDevices) Main_IDirect3DImpl_7_EnumDevices, XCAST(CreateDevice) Main_IDirect3DImpl_7_CreateDevice, XCAST(CreateVertexBuffer) Main_IDirect3DImpl_7_3T_CreateVertexBuffer, - XCAST(EnumZBufferFormats) Main_IDirect3DImpl_7_3T_EnumZBufferFormats, + XCAST(EnumZBufferFormats) GL_IDirect3DImpl_7_3T_EnumZBufferFormats, XCAST(EvictManagedTextures) Main_IDirect3DImpl_7_3T_EvictManagedTextures, };