(Hopefully) easy Direct3D Texture question

Started by
3 comments, last by Halsafar 18 years, 10 months ago
hi, my question is - how do i restore a texture in managed Direct3D when the device is reset, after being lost? i get the following error messages:
Quote:A first chance exception of type 'System.NullReferenceException' occurred in Microsoft.DirectX.Direct3DX.dll GetUnmanagedTexture: Object reference not set to an instance of an object.
maybe i have to reload the texture from a bitmap/file, i dunno. i don't think this would be very quick though. please help asap... thx in advance, alex
Advertisement
Use managed textures instead.
Using Managed Textures is really easy and will work fine almost all the time. If you can't use them, then you need to release the texture when you lost the device and reload it when you regain it.
Stay Casual,KenDrunken Hyena
thx for the replies...how do i use managed textures then? Pool.Managed ?
Yes.
D3DPOOL_MANAGED is the enum definition.

This topic is closed to new replies.

Advertisement