Generic calls to OnResetDevice() and OnLostDevice()
Posted
by bobobobo
on Stack Overflow
See other posts from Stack Overflow
or by bobobobo
Published on 2010-03-18T16:02:36Z
Indexed on
2010/03/19
8:11 UTC
Read the original article
Hit count: 234
This is kind of a COM question to do with DirectX.
So, both ID3DXSprite and ID3DXFont and a bunch of the other ID3DX* objects require you to call OnLostDevice() when the d3d device is lost AND OnResetDevice() when the device is reset.
What I want to do is maintain an array of all ID3DX* objects and simply call OnResetDevice() and OnLostDevice() on each whenever the device is lost or reset.
However I can't seem to find a BASE CLASS for the ID3DX* classes... they all seem to COM-ually inherit from IUnknown.
Is there a way to do this or do I have to maintain separate arrays of ID3DXFont* pointers, ID3DXSprite* pointers, etc?
© Stack Overflow or respective owner