ParaToxic Posted April 17, 2012 Share Posted April 17, 2012 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 ? Quote Link to comment Share on other sites More sharing options...
LordHippo Posted April 17, 2012 Share Posted April 17, 2012 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. Quote 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 Link to comment Share on other sites More sharing options...
ParaToxic Posted April 17, 2012 Author Share Posted April 17, 2012 Ok when I can load the models .. only in the mainthread ,it isn't very usefull ,because I wanted to load the ressources while the introscreen or the menu in a other thread. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
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.