I'm using managed directx 2.0 and the sample framework and there's a couple of things that i cannot understand concerning lost devices. My main problem is, where should i put the creation of objects. For instance in the sample framework a sprite is created in OnResetDevice, my question is why in here and not in OnCreateDevice When should i create resources with Pool.Default And when i'm using directx objects how could i know where i put the creation call It's on the OnCreateDevice or on the OnResetDevice
This is very confuse, and there's no documentation ( i have not found none ) that answers my questions.
Tnks for any help

Lost Device
MikeP2a
As MDX 2 is still in Beta you should post such question in the beta newsgroups. See http://msdn.com/directx/beta for details.
But as your question applies even to MDX 1 I am think it is ok to answer it here.
Create all your managed resource in OnCreateDevice.
Create your default pool resource in OnResetDevice.
Dispose your default pool resource in OnLostDevice.
Dispose your managed resource in OnDestroyDevice.
LeviS
You should never create any object in lost device. I am sure you mean OnResetDevice. The functions were you should create your objects depends only on the pool.
With “Sprite” you mean the Sprite class from the framework All this helper classes are a little bit tricky because they create other DirectX objects internal and you don’t know the pool for these objects. In this case you should go the save way and create them in OnDeviceReset and dispose them in OnLostDevice. Most of this helpers use a default pool resource anywhere.
Ozcan Ozay
Play4sure