Jump to content
  • Advertisement
Sign in to follow this  
AdamTheStudent

Is this DX9 process flow outline sound?

This topic is 4821 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

Hi, I'm learning DirectX 9 and would like those people experienced with it to let me know if the outline I provide below for how it flows is sound. I've done much reading, but have no one to talk to about this to really know whether I truly understand or not. The outline does not include setting up of Win32. ***** Some items may be able to be removed from the rendering portion, since I'm not sure if setting the streamsource needs to be done after each drawing. Initialization stages: - Obtain the main IDirect3D9 interface. - Set values for a present parameters structure. - Obtain a IDirect3DDevice9 interface from IDirect3D9 with the parameter structure, hWnd, etc. - Obtain a IDirect3DVertexBuffer9 interface by using IDirect3DDevice9. - Lock the vertex buffer, write vertex info to it, the unlock it. Rendering stages: - Call IDirect3DDevice9::Clear() to clear the back buffer. - Call IDirect3DDevice9::BeginScene(). - Call IDirect3DDevice9::SetFVF(). - Call IDirect3DDevice9::SetStreamSource() with the vertex buffer as argument. - Call IDirect3DDevice9::DrawPrimitive() with the type of primitive which the vertex data represents and the number of them. - Call IDirect3DDevice9::EndScene(). Shutting down: Call ::Release() method of each interface in the reverse order that they were created, after verifying that the pointers are not null. Thanks in advance! I'd also appreciate any assistance you think may be helpful such as flow diagrams, etc.

Share this post


Link to post
Share on other sites
Advertisement
Ok I quickly skimmed it -- it seems okay only not too advanced. What you have listed will give the basic flow for rendering a simple mesh. It does not include indexed rendering or device resetting among other things. But so far so good.

Illco

Share this post


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

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!