![]() |
Gray C++ Libraries
0.0.2
A set of C++ libraries for MSVC, GNU on Windows, WinCE, Linux
|
#include <cDXBase.h>
Public Member Functions | |
cDXBase (cDXDevice *pDXDev=nullptr) noexcept | |
virtual | ~cDXBase () |
ID3DDevice * | get_D3DDev () const noexcept |
bool | isInitDevice () const noexcept |
bool | isLostDevice () const noexcept |
virtual HRESULT | InitDeviceObjects (cDXDevice *pDXDev) |
virtual HRESULT | OnResetDeviceX () |
virtual HRESULT | OnLostDeviceX () |
virtual HRESULT | DeleteDeviceObjects () |
UNITTEST_FRIEND (cDXBase) | |
Public Attributes | |
cDXDevice * | m_pDXDev |
What device is this attached to (or should be)? InitDeviceObjects() was called and DeleteDeviceObjects() was not. More... | |
cIUnkPtr< ID3DDevice > | m_pD3DDev |
A resource object that is also (maybe) DirectX related/managed, attached to a cDXDevice. (and can be lost/disposed). or has children that do. Base class for the object that manages the DX interface pointer. (may not be actually rendered object). e.g. cXTextureMgr, cDXFont, cDXGPUVert, cDXRenderBatch, cDXSpriteDC, cDXTextureBase May have SetPrivateData
|
noexcept |
|
virtual |
Assume DeleteDeviceObjects was called??
|
virtual |
delete the interface.
Reimplemented in GrayGUI::cXWindowText, GrayGUI::cXWindow, GrayGUI::cXDesktopMgr, Gray3D::cXTextureFile, Gray3D::cDXTexture, and Gray3D::cDXTextureBase.
|
inlinenoexcept |
Get the device but only if active. Dont call this if the device is Lost.
Created my DX interface/object and attached it to a IDirect3DDevice9
Reimplemented in GrayGUI::cXWindowText, GrayGUI::cXWindow, Gray3D::cXTextureFile, and Gray3D::cDXTexture.
|
inlinenoexcept |
has InitDeviceObjects() been called?
|
inlinenoexcept |
Device is lost. Wait for ResetDevice to be called.
|
virtual |
We have lost (or are going to lose) control of the device. Assume anything cached in its memory is gone. ASSUME ID3DDevice->Reset() will be called or we got D3DERR_DEVICELOST. Assume Vertex buffers, textures, etc are lost. release them. Call OnLostDevice() on appropriate interfaces.
Reimplemented in GrayGUI::cXWindowText, GrayGUI::cXWindow, GrayGUI::cXDesktopMgr, GrayGUI::cXImage, and GrayGUI::cXColorGrid.
|
virtual |
Reload/Restore resources to the ID3DDevice/IDirect3DDevice9 memory. call OnResetDevice() on appropriate interfaces. must reload vertex buffers and textures.
Reimplemented in GrayGUI::cXWindowText, GrayGUI::cXWindow, GrayGUI::cXDialog, and GrayGUI::cXDesktopMgr.
Gray3D::cDXBase::UNITTEST_FRIEND | ( | cDXBase | ) |
cIUnkPtr<ID3DDevice> Gray3D::cDXBase::m_pD3DDev |
cDXDevice* Gray3D::cDXBase::m_pDXDev |
What device is this attached to (or should be)? InitDeviceObjects() was called and DeleteDeviceObjects() was not.
Set to nullptr on OnLostDeviceX() because we are calling ID3DDevice->Reset() or got D3DERR_DEVICELOST. assume resource is disposed.