D3DTSS_MAGFILTER & D3DTSS_MINFILTER

Started by
3 comments, last by mR djaX 17 years, 9 months ago
Hi, I'm trying to port a code from DirectX 8.0 to 9.0 and I'm stuck with:
D3DDevice->SetTextureStageState(0, D3DTSS_MAGFILTER, D3DTEXF_LINEAR);
D3DDevice->SetTextureStageState(0, D3DTSS_MINFILTER, D3DTEXF_LINEAR);
What can replace D3DTSS_MAGFILTER and D3DTSS_MINFILTER? Thanks for your help.
Advertisement
1.
A new function was added to DirectX 9 just for setting texture sampler specific state: IDirect3DDevice9::SetSamplerState(), because things like filtering modes are properties of a particular texture sampler rather than a multi-texture stage.

2.
D3DDevice->SetSamplerState(0, D3DSAMP_MAGFILTER, D3DTEXF_LINEAR);
D3DDevice->SetSamplerState(0, D3DSAMP_MINFILTER, D3DTEXF_LINEAR);

3.
Handy topic to read in the (C++) docs:
DirectX Graphics ->
Direct3D 9 ->
Converting to Direct3D 9

Simon O'Connor | Technical Director (Newcastle) Lockwood Publishing | LinkedIn | Personal site

Thanks!
Could you post the link to the ressource? I can't find it :(

[Edited by - mR djaX on July 7, 2006 5:23:52 AM]
Quote:Original post by mR djaX
Thanks!
Could you post the link to the ressource? I can't find it :(


It's in the documentation that comes with the SDK, and also on MSDN:

http://msdn.microsoft.com/library/default.asp?url=/library/en-us/directx9_c/Converting_to_DirectX_9.asp?frame=true

Simon O'Connor | Technical Director (Newcastle) Lockwood Publishing | LinkedIn | Personal site

OK, thanks again!

This topic is closed to new replies.

Advertisement