[vlc-devel] Small Direct3D patch

Daniel Klíma danklima at gmail.com
Tue Jul 3 09:15:11 CEST 2007


Hallo all,
I made small patch adding two checks of adapter capabilities.Namely
check for Square-only and Address clamp.For now it issues warnings for
both.

Hopefully it should be good.(I am unable to get Cygwin with gcc-4.2 to
compile VLC).

Klimax
-------------- next part --------------
Index: direct3d.c
===================================================================
--- direct3d.c	(revision 20729)
+++ direct3d.c	(working copy)
@@ -628,6 +628,16 @@
     }
     /* TODO: need to test device capabilities and select the right render function */
 
+    if (d3dCaps.TextureCaps == D3DPTEXTURECAPS_SQUAREONLY)
+    {
+       msg_Warn( p_vout, "This adapter supports only Square textures!", hr);
+    }
+    if (!(d3dCaps.TextureAddressCaps == D3DPTADDRESSCAPS_CLAMP))
+    {
+       msg_Warn( p_vout, "This adapter does not support address clamping!", hr);
+       return VLC_EGENERIC;
+    }
+
     return VLC_SUCCESS;
 }
 
-------------- next part --------------
_______________________________________________
vlc-devel mailing list
vlc-devel at videolan.org
http://mailman.videolan.org/listinfo/vlc-devel


More information about the vlc-devel mailing list