Jump to content

Ressource Manager


ParaToxic
 Share

Recommended Posts

Hey I have an idea for a Resource Manager who loads the whole gameressources like models/textures... in a second thread.

It is right that when I load a model and load it a second time the engine doesn't load the model again but create a instance of the model.

So I load all ressources in a thread and now I need to hide all models/meshes.Can I use FreeEntity() for it ,or does this command ensures that the engine doesn't create instances of the model ?

Link to comment
Share on other sites

Loading 1 instance of all your models and textures is a good idea, only if you have no memory constrains.

 

Also FreeEntity decreases instance count of that entity by one, and when the instance count reaches zero, the model will be freed completely. So the next time you load that model it will be loaded from the hdd.

So your only way is to hide that instance.

 

BTW, you only can load a model or texture in the main thread.

You can load one instance of all your models in the loading of your scene, then load any instances you want each frame. But it has no obvious benefit over loading them all at once.

Ali Salehi | Programmer

 

Intel Core i3 2100 @ 3.0GHz | GeForce GTS 450 | 4GB DDR3 RAM | Windows 7 Ultimate x64

LE 2.50 | Visual Studio 2010 | RenderMonkey 1.82 | gDEBugger 5.8 | FX Composer 2.5 | UU3D 3 | xNormal 3.17

 

 

76561198023085627.png

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share

×
×
  • Create New...