How to design rendering loop in your 3d engine
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]
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.
its called batching - giving the card as much as you can at once before having to do a state change.
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...
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...
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
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
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement