![]() |
Gray C++ Libraries
0.0.2
A set of C++ libraries for MSVC, GNU on Windows, WinCE, Linux
|
#include <cDXDevice.h>
Public Member Functions | |
cDXDevice (ID3DDevice *pD3DDev=nullptr) | |
~cDXDevice () | |
HRESULT | CreateDeviceDummy () |
HRESULT | CreateDeviceWindowed (HWND hWnd) |
cIUnkPtr< ID3DSurface > | CreateDeviceCursor (const ICONINFO &iconinfo, bool bAddWatermark) |
HRESULT | SetDeviceCursor (HCURSOR hCursor, bool bAddWatermark) |
![]() | |
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) | |
Static Public Member Functions | |
static cString GRAYCALL | GetErrorMessage (HRESULT hRes) |
static const GChar_t *GRAYCALL | GetD3DFormatStr0 (D3DFORMAT format) |
static cString GRAYCALL | GetD3DFormatStr (D3DFORMAT format) |
static const GChar_t *GRAYCALL | GetD3DMultisampleStr (D3DMULTISAMPLE_TYPE n) |
static const GChar_t *GRAYCALL | D3DDevTypeToString (D3DDEVTYPE devType) |
static const GChar_t *GRAYCALL | MultisampleTypeToString (D3DMULTISAMPLE_TYPE MultiSampleType) |
static const GChar_t *GRAYCALL | PresentIntervalToString (UINT pi) |
Public Attributes | |
cIUnkPtr< ID3DDevice > | m_pD3DDev |
cXTextureMgr * | m_pTexMgr |
Manage/cache all the textures loaded for this device. Can be stored on the device or in system memory. More... | |
![]() | |
cDXDevice * | m_pDXDev |
What device is this attached to (or should be)? InitDeviceObjects() was called and DeleteDeviceObjects() was not. More... | |
cIUnkPtr< ID3DDevice > | m_pD3DDev |
Wrap a ID3DDevice/IDirect3DDevice9. Manage all the stuff attached to the D3D device.
Gray3D::cDXDevice::cDXDevice | ( | ID3DDevice * | pD3DDev = nullptr | ) |
Gray3D::cDXDevice::~cDXDevice | ( | ) |
cIUnkPtr< ID3DSurface > Gray3D::cDXDevice::CreateDeviceCursor | ( | const ICONINFO & | iconinfo, |
bool | bAddWatermark | ||
) |
Create a IDirect3DSurface9 for the windows cursor/icon. for fullscreen mode. TODO Merge. Similar to SetWindowsIcon()
HRESULT Gray3D::cDXDevice::CreateDeviceDummy | ( | ) |
will create "dummy" Direct3d device, just to do software processing, for stand-alone compiler for example it will require only DirectX on target machine, but no actual 3d accelerator will be required D3DERR_INVALIDDEVICE
HRESULT Gray3D::cDXDevice::CreateDeviceWindowed | ( | HWND | hWnd | ) |
Create a ID3DDevice/IDirect3DDevice9 that is compatible with the current desktop. Windowed mode. Link IDirect3DDevice9 to a HWND
|
static |
Returns the string for the given D3DDEVTYPE.
Returns the string for the given D3DFORMAT. string should include the "D3DFMT_" prefix
|
static |
|
static |
Returns the string for the given D3DMULTISAMPLE_TYPE.
Returns the string for the given present interval.
HRESULT Gray3D::cDXDevice::SetDeviceCursor | ( | HCURSOR | hCursor, |
bool | bAddWatermark | ||
) |
Builds and sets a cursor for the D3D device based on hCursor. Gives the D3D device a cursor with image and hotspot from hCursor. Should cache this ??
cIUnkPtr<ID3DDevice> Gray3D::cDXDevice::m_pD3DDev |
cXTextureMgr* Gray3D::cDXDevice::m_pTexMgr |
Manage/cache all the textures loaded for this device. Can be stored on the device or in system memory.