Sign in to follow this  
Stowelly

need a little help with restoredeviceobjects() function

Recommended Posts

hi just having a few problems trying to work out what exactly i need to update when i change the display options in my program i have made an objct manager which handles the creation and removal of a number of d3dx meshes (some skinned anims some textured static) do i need to completely recreate this or is some of this still remembered? if i have to completely recreate the objects whats an easy way of remembering there positions and orientation within the world? sorry for being so vague im abit confused cheers

Share this post


Link to post
Share on other sites
I am working on something similar at present if I follow your drift.

One way is to use MANAGED pool resources. These do not need to be reallocated when the device is reset. They would if the device was released. (thx to sirob for this!)

My DEFAULT pool resources are each managed in a seperate manager, meshes, textures etc. When about to reset the device, I dont delete all the entries in the manager, I just run thru them all, releasing them, reset the device, then run thru and re allocate them.

If your meshes are member variables of a cObject, for instance, then do a similar thing. Run thru all the cObjects in your cObjectManager, releasing the meshes (not deleting the cObjects themselves), reset device, then run thru reallocating the meshes.

hth

Si

Share this post


Link to post
Share on other sites
ah ok i think i see, so all i need to do is release any D£DX objects (e.g meshes , textures etc etc) then realocate them on the update function?

wont this get a bit slow when its required to re-load from a file every single objects mesh data though? isnt there a more optimal way of doing this?

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this