Jump to content
  • Advertisement

Archived

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

MatrixCubed

Scene graph design

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

Hullo, I''m working on a scene graph that is comprised of the following "managers": - texture manager - model manager - node manager Each one (obviously) manages what it says it does . My main concern now is that I''m designing the model manager correctly. What each manager does is store a list (STL vector, to be precise) of classes that hold texture data, model vertices, or 3D points & their associated callback functions (depending on which manager we''re talking about). What vexes me right now, is if I''m going about my model manager correctly or not. What I want to do is use the model manager to hold unique model data, no copies whatsoever, and have each node reference it. When it''s supposed to be rendered, the renderer does a lookup per frame (yeah I know, I''ll eventually optimize this so it doesn''t have to do that) then renders the model at the proper manager''s index. I''m worried that not duplicating model data will eventually bite me in the seat of the pants for some reason that I''m not aware of, or some 3D engine design that I''m missing or completely clueless about will materialize once I''ve put a lot of coding hours into the engine. Comments are certainly welcome! MatrixCubed
http://MatrixCubed.cjb.net

Share this post


Link to post
Share on other sites
Advertisement
I can''t think of any reason whatsoever for keeping copies of models, unless you plan on doing something really nifty like keeping dynamic warps or something, even in this case it would be possible to make a copy of the model as and when necessary.

Share this post


Link to post
Share on other sites
its a good idea.
i tend to seperate the rendering side (models/meshes/textures/framebuffer etc) stuff from the scene (Xtree,ppl,particle systems etc).
also i use global ID''s and not pointers
eg
struct Person
{
Model *model; // i dont do this
int model_ID; // but do this instead
}

http://uk.geocities.com/sloppyturds/gotterdammerung.html

Share this post


Link to post
Share on other sites
i was in the paulaner tent that evening at oktoberfest so assume its paulaner bier

http://uk.geocities.com/sloppyturds/gotterdammerung.html

Share this post


Link to post
Share on other sites

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!