# Couple DX8 to DX9 Questions

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

## 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_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

Perfect. Thanks!

Matt Hughson

1. 1
Rutin
29
2. 2
3. 3
4. 4
5. 5

• 13
• 13
• 11
• 10
• 13
• ### Forum Statistics

• Total Topics
632954
• Total Posts
3009447
• ### Who's Online (See full list)

There are no registered users currently online

×