• Advertisement

Archived

This topic is now archived and is closed to further replies.

How to design rendering loop in your 3d engine

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

How do you design your rendering loop in your 3d engine ?? I've read once about Direct3D optimization and it said something about feeding the hardware all at once from the previous frame but I'm not sure what it means and how to put it in my engine design. So from these two design, which one is better or there's no difference or there are other way ?? I BeginScene() LogicProcess DrawPrimitive LogicProcess DrawPrimitive . . EndScene() //repeat the sequence each frame OR should we do this : II LogicProcess LogicProcess . . LogicProcess //save all your work in a somekinda job buffer BeginScene() DrawPrimitive //Draw the whole damn thing EndScene() I hope you get the idea. thx [edited by - yanuart on October 3, 2002 11:27:26 PM]

Share this post


Link to post
Share on other sites
Advertisement
Guest Anonymous Poster
the second way is the one to choose.
its called batching - giving the card as much as you can at once before having to do a state change.

Share this post


Link to post
Share on other sites
According to nVidia and M$ directx docs its very important to do so,

I recall that you should group in the following order
Render Target, Texture, State changes
... or
Render Target, State changes, Texture....
don''t recall the exact order...

Share this post


Link to post
Share on other sites
Yeah see:
http://www.gamedev.net/community/forums/topic.asp?topic_id=117496

-------
"Programming is like sex make one mistake, and you have to support it forever."
Homepage: http://students.washington.edu/andrey

Share this post


Link to post
Share on other sites

  • Advertisement