• Advertisement
Sign in to follow this  

About vertex buffer copy

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

Hi everyone, I'm a beginer of DirectX 11.I'm now coding for <Models manager>. I just use linear list to save loaded models, and I created 2 classes, one is "Model", another is "Models Manager", what I think is people can choose use manager or not, for example somewhere may be you want use model for 1 second ?

 

Question is :

 

1.I use class "Model" to create a object, and there must vertex data & index data in it. Now I should copy these data to "Model list" node, how to copy these data ?

 

2.Am I doing a right design ? Please tell me if I think in wrong way.

 

 

Thanks a lot !

Share this post


Link to post
Share on other sites
Advertisement

Zonozz,

 

If you are asking "should I embed a reference to my Model class instance into my ModelManager Models list" and save it as a single file, I would say "no". Give a unique reference code to your Model instance, and keep a copy of that unique code in your ModelManager using list of model codes. This enables you to load and save the models and model manager seperately, as needed.

 

It this isn't what you are asking, then feel free to re-phrase your question - I maybe haven't understood what problem you are trying to solve.

Share this post


Link to post
Share on other sites

Zonozz,

 

If you are asking "should I embed a reference to my Model class instance into my ModelManager Models list" and save it as a single file, I would say "no". Give a unique reference code to your Model instance, and keep a copy of that unique code in your ModelManager using list of model codes. This enables you to load and save the models and model manager seperately, as needed.

 

It this isn't what you are asking, then feel free to re-phrase your question - I maybe haven't understood what problem you are trying to solve.

 

Thanks for replying.

 

I'm now coding a ModelsManager, but before this I created a class named "Model" for saving 1 model temporary, now I want to add this temporary model to the manager's model list, when I try to copy vertex buffer & index buffer, I got memory error. And Im not mean saving model in single file, I mean should Engine forces users use models by manager ? I'm not sure this idea is in general.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement