[D3D] Some additionnal mip-mapping fixes...

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



This fixes texturing in Gabriel Knight 3... This works for now, will have to
do some investigations on Windows to see if the mip-maps are generated by
DirectX or not in this case.

Changelog:
 - initialize the dwMipmapCount field even if the application forgets it

-- 
		 Lionel Ulmer - http://www.bbrox.org/
Index: dlls/ddraw/ddraw/main.c
===================================================================
RCS file: /home/wine/wine/dlls/ddraw/ddraw/main.c,v
retrieving revision 1.39
diff -u -r1.39 main.c
--- dlls/ddraw/ddraw/main.c	15 Mar 2003 01:11:15 -0000	1.39
+++ dlls/ddraw/ddraw/main.c	10 May 2003 15:55:22 -0000
@@ -355,6 +355,14 @@
 						  GET_BPP(ddsd)*8);
     }
 
+    /* Check also for the MIPMAP / MIPMAPCOUNT flags.
+       TODO: check if Windows 'auto-builds' somehow the mip-map levels */
+    if (((ddsd.dwFlags & DDSD_MIPMAPCOUNT) == 0) &&
+	((ddsd.ddsCaps.dwCaps & DDSCAPS_MIPMAP) != 0)) {
+        ddsd.dwFlags |= DDSD_MIPMAPCOUNT;
+	ddsd.u2.dwMipMapCount = 1;
+    }
+    
     ddsd.dwFlags |= DDSD_PITCH | DDSD_PIXELFORMAT;
 
     hr = This->create_texture(This, &ddsd, ppSurf, pUnkOuter, mipmap_level);

[Index of Archives]     [Gimp for Windows]     [Red Hat]     [Samba]     [Yosemite Camping]     [Graphics Cards]     [Wine Home]

  Powered by Linux