Skip to main content
gamedev.net
🔒 Locked

Efficient buffer management...

Started by dagbud Nov 2, 2004 at 11:32 PM 1 replies 650+ views
Original Post
dagbud
dagbud
I am currently learning the Direct3D api, and I will admit I am not an expert. I have been reading on techniques for efficient vertex buffer management and seem to come across the same idea which is to batch all of my data to one buffer then render as much as I can from that buffer to minimize DrawPrimitive calls and vertex buffer state changes... I can manage the vertex buffers to minimize buffer changes, but how do I go about rendering objects with the same vertex buffer but with different translations, textures, and/or index buffers using a minimum number of DrawPrimitive calls? Also, does anyone know a good resource on using multiple stream sources to render objects? [Edited by - dagbud on November 8, 2004 1:11:15 PM]
Edmund Weese7-bit Games
EverIce
EverIce
What i'm doing in my engine :

I have an abstract class RenderObject, i derive all my renderable object from it. A ship, an fps, counter a menu is a renderobject.

class RenderObject{   class Geometry;//vb, ib, etc   class RenderOperation;//states. etc   class Material;//textures, colors};My scene graph                  Root            /      |                Geometry 1  Geometry 2 .. Geometry n      /RenderOperation 1 .. n    /Material 1..n  /RenderObject level !!  
dagbud
dagbud
I'm assuming that each geometry node in the graph holds vertex, index, etc data for more than just one object. Would it also be correct to assume that all the data in the Geometry object has a common format? And, (assuming Direct3D here), do you have a DrawPrimitive call for each renderObject in order to render the object after transformations and materials have been applied?


[Edited by - dagbud on November 8, 2004 1:50:19 PM]
Edmund Weese7-bit Games

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.