From 680b7878e4451c127623b65d4f54da477d423e99 Mon Sep 17 00:00:00 2001 From: aignacio_sf <> Date: Wed, 4 Jan 2006 03:07:23 +0000 Subject: [PATCH] Fix an error reported by DirectX in debug mode. Can't pass 0 for SetSamplerState (..., D3DSAMP_MAXANISOTROPY, ... ) --- panda/src/dxgsg9/dxGraphicsStateGuardian9.cxx | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/panda/src/dxgsg9/dxGraphicsStateGuardian9.cxx b/panda/src/dxgsg9/dxGraphicsStateGuardian9.cxx index 604f11ceb6..ba135e9aac 100755 --- a/panda/src/dxgsg9/dxGraphicsStateGuardian9.cxx +++ b/panda/src/dxgsg9/dxGraphicsStateGuardian9.cxx @@ -244,7 +244,9 @@ apply_texture(int i, TextureContext *tc) { uint aniso_degree = tex->get_anisotropic_degree(); Texture::FilterType ft = tex->get_magfilter(); - _d3d_device->SetSamplerState(i, D3DSAMP_MAXANISOTROPY, aniso_degree); + if (aniso_degree >= 1) { + _d3d_device->SetSamplerState(i, D3DSAMP_MAXANISOTROPY, aniso_degree); + } D3DTEXTUREFILTERTYPE new_mag_filter; if (aniso_degree <= 1) {