Advertisement Jump to content
Sign in to follow this  

Couple DX8 to DX9 Questions

This topic is 4992 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Hey guys, I've decided to make the jump from DX8 to DX9. I'm in the process of converting my engine right now, and have just come across of few places where I'm not sure what to do. Feel free to reply if you have answers to any of the problems. Example code is very much appretiated!
Question 1: The first problem I hit was with the D3D devices menthod: SetVertexShader. In DX I would simply send a define which described my FVF. It seem in DX9, they want a IDirect3DVertexShader9*. I took a look at the docs, and was a little thrown to find that the object has no members, and only 2 methods; both of which are getter functions?? So what exactly do I do with this object? Just allocate some memory for it, and send it to the SetVertexShader function? That doesn't seem right to me. I should mention that I am using a fixed function pipeline at the moment, so no actually shader scripts are needed.
Question 2: My next question refers to SetTextureStateStage. It seems that a couple of the D3DTSS_* defines are no longer recognized. I seem to remember hearing that some of this stuff had been moved into the RenderState side of thing. Here is what I have currently:
	m_pD3DDevice->SetTextureStageState(0, D3DTSS_ADDRESSU, D3DTADDRESS_WRAP);
	m_pD3DDevice->SetTextureStageState(0, D3DTSS_ADDRESSV, D3DTADDRESS_WRAP);
	m_pD3DDevice->SetTextureStageState ( 0, D3DTSS_MINFILTER, D3DTEXF_LINEAR );
	m_pD3DDevice->SetTextureStageState ( 0, D3DTSS_MAGFILTER, D3DTEXF_LINEAR );
	m_pD3DDevice->SetTextureStageState ( 0, D3DTSS_MIPFILTER, D3DTEXF_LINEAR );
How anyone be kind enough to show the equivelent of these calls in D3D9?
Other than that, I think I should be good. Matt Hughson

Share this post

Link to post
Share on other sites
Sign in to follow this  

  • Advertisement

Important Information

By using, you agree to our community Guidelines, Terms of Use, and Privacy Policy. is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!