Skip to main content
GameDev.net gamedev.net
🔒 Locked

need help on object/rendering structures for 3d engine

Started by Furious George May 13, 2004 at 2:08 PM 1 replies 250+ views
Original Post
Furious George
Furious George
I am curious as to how to implement 3d objects in the rendering pipeline for a 3d engine. How I think it works is this. Everything in the world is represented by an object. The object contains the position of each vertex and it''s normal as well as u,v coords and texture info. All the objects are contained in a linked list. Now when I transform the objects from model space to word space i just go through the linked list of objects and transform, rotate, etc. What I don''t know is how the vertex info is stored in the object. Should it be contained in an array or in a vertex buffer and index buffer? I hear of vb/ib all the time and how fast they are. When is a good time to use them? Should I use them at the object level or after in say a render list. Thanks in advance to everyone for their input. Furious George
JClayton
JClayton
The main reason that you have heard that vertex arrays are fast is mainly because they are... I recommend using vertex arrays for all models that are loaded from file. It not only improves the speed of the renender to calculate all of the vertex info when the model is loaded but it is also more efficient to do so all at one time.

As far as render lists (I believe you mean Display Lists) are usefull for routines that will be the same every frame that is rendered.
Furious George
Furious George
ok so I define the vertex/index buffer in the object right, so then I can load the vertex data straight into the object. then transform to world space and cull?

Topic Locked

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

Sign in to reply to this topic.