[PATCH] Add a function which checks the bump mapping capabilities. Again this will be used by the new CheckDeviceFormat.
Roderick Colenbrander
thunderbird2k at gmx.net
Mon Mar 3 16:08:48 CST 2008
---
dlls/wined3d/directx.c | 28 ++++++++++++++++++++++++++++
1 files changed, 28 insertions(+), 0 deletions(-)
diff --git a/dlls/wined3d/directx.c b/dlls/wined3d/directx.c
index bd83ed3..1fe9ec2 100644
--- a/dlls/wined3d/directx.c
+++ b/dlls/wined3d/directx.c
@@ -1823,6 +1823,34 @@ static HRESULT WINAPI IWineD3DImpl_CheckDeviceType(IWineD3D *iface, UINT Adapter
}
#define GLINFO_LOCATION Adapters[Adapter].gl_info
+/* Check if we support bumpmapping for a format */
+static BOOL CheckBumpMapCapability(UINT Adapter, WINED3DFORMAT CheckFormat)
+{
+ if(GL_SUPPORT(NV_REGISTER_COMBINERS) && GL_SUPPORT(NV_TEXTURE_SHADER2)) {
+ switch (CheckFormat) {
+ case WINED3DFMT_V8U8:
+ TRACE_(d3d_caps)("[OK]\n");
+ return TRUE;
+ /* TODO: Other bump map formats */
+ default:
+ TRACE_(d3d_caps)("[FAILED]\n");
+ return FALSE;
+ }
+ }
+ if(GL_SUPPORT(ATI_ENVMAP_BUMPMAP)) {
+ switch (CheckFormat) {
+ case WINED3DFMT_V8U8:
+ TRACE_(d3d_caps)("[OK]\n");
+ return TRUE;
+ default:
+ TRACE_(d3d_caps)("[FAILED]\n");
+ return FALSE;
+ }
+ }
+ TRACE_(d3d_caps)("[FAILED]\n");
+ return FALSE;
+}
+
/* Check if the given DisplayFormat + DepthStencilFormat combination is valid for the Adapter */
static BOOL CheckDepthStencilCapability(UINT Adapter, WINED3DFORMAT DisplayFormat, WINED3DFORMAT DepthStencilFormat)
{
--
1.5.3.4
--========GMX158712046225779820--
More information about the wine-patches
mailing list