DDraw: Implement GetRenderState for D3DRENDERSTATE_TEXTURE[MIN/MAG]
Stefan Dösinger
stefandoesinger at gmx.at
Mon Oct 16 05:43:57 CDT 2006
-------------- next part --------------
From a53eb839cc05e06adb5978d49c46e5f84b96773e Mon Sep 17 00:00:00 2001
From: Stefan Doesinger <stefan at codeweavers.com>
Date: Mon, 16 Oct 2006 12:31:48 +0200
Subject: [PATCH] DDraw: Implement GetRenderState for D3DRENDERSTATE_(MIX/MAX)FILTER
---
dlls/ddraw/device.c | 46 ++++++++++++++++++++++++++++++++++++++++++++++
1 files changed, 46 insertions(+), 0 deletions(-)
diff --git a/dlls/ddraw/device.c b/dlls/ddraw/device.c
index 8b519a6..345e974 100644
--- a/dlls/ddraw/device.c
+++ b/dlls/ddraw/device.c
@@ -2135,6 +2135,52 @@ IDirect3DDeviceImpl_7_GetRenderState(IDi
return hr;
}
+ case D3DRENDERSTATE_TEXTUREMAG:
+ {
+ WINED3DTEXTUREFILTERTYPE tex_mag;
+
+ hr = IWineD3DDevice_GetSamplerState(This->wineD3DDevice,
+ 0, WINED3DSAMP_MAGFILTER,
+ &tex_mag);
+
+ switch (tex_mag)
+ {
+ case WINED3DTEXF_POINT:
+ *Value = D3DFILTER_NEAREST;
+ break;
+ case WINED3DTEXF_LINEAR:
+ *Value = D3DFILTER_LINEAR;
+ break;
+ default:
+ ERR("Unhandled texture mag %d !\n",tex_mag);
+ *Value = 0;
+ }
+ return hr;
+ }
+
+ case D3DRENDERSTATE_TEXTUREMIN:
+ {
+ WINED3DTEXTUREFILTERTYPE tex_min;
+
+ hr = IWineD3DDevice_GetSamplerState(This->wineD3DDevice,
+ 0, WINED3DSAMP_MINFILTER,
+ &tex_min);
+
+ switch (tex_min)
+ {
+ case WINED3DTEXF_POINT:
+ *Value = D3DFILTER_NEAREST;
+ break;
+ case WINED3DTEXF_LINEAR:
+ *Value = D3DFILTER_LINEAR;
+ break;
+ default:
+ ERR("Unhandled texture mag %d !\n",tex_min);
+ *Value = 0;
+ }
+ return hr;
+ }
+
case D3DRENDERSTATE_TEXTUREADDRESSU:
case D3DRENDERSTATE_TEXTUREADDRESSV:
case D3DRENDERSTATE_TEXTUREADDRESS:
--
1.4.1.1
More information about the wine-patches
mailing list