Is this DX9 process flow outline sound?

Started by
2 comments, last by AdamTheStudent 18 years, 7 months ago
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.
http://adamthestudent.blogspot.com/
Advertisement
Bump.... sorry, I really need to know if this is correct or not.
http://adamthestudent.blogspot.com/
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
Thanks for the reply!

I'm been learning about 3D graphics and the DirectX API this week so am starting off with the basics. :)
http://adamthestudent.blogspot.com/

This topic is closed to new replies.

Advertisement