Gray C++ Libraries  0.0.2
A set of C++ libraries for MSVC, GNU on Windows, WinCE, Linux
cDXDevice.h
Go to the documentation of this file.
1 //
4 //
5 
6 #ifndef _INC_cDXDevice_H
7 #define _INC_cDXDevice_H
8 #ifndef NO_PRAGMA_ONCE
9 #pragma once
10 #endif
11 
12 #include "cDXBase.h"
14 
15 namespace Gray3D
16 {
17  class cXTextureMgr;
18 
19  class GRAY3D_LINK cDXDevice : public cDXBase
20  {
24 
25  public:
28 
29  public:
30  cDXDevice(ID3DDevice* pD3DDev = nullptr);
31  ~cDXDevice();
32 
33  static cString GRAYCALL GetErrorMessage(HRESULT hRes);
34 
35  HRESULT CreateDeviceDummy();
36  HRESULT CreateDeviceWindowed(HWND hWnd);
37 
38  static const GChar_t* GRAYCALL GetD3DFormatStr0(D3DFORMAT format); // no prefix
39  static cString GRAYCALL GetD3DFormatStr(D3DFORMAT format);
40  static const GChar_t* GRAYCALL GetD3DMultisampleStr(D3DMULTISAMPLE_TYPE n);
41  static const GChar_t* GRAYCALL D3DDevTypeToString(D3DDEVTYPE devType);
42  static const GChar_t* GRAYCALL MultisampleTypeToString(D3DMULTISAMPLE_TYPE MultiSampleType);
43  static const GChar_t* GRAYCALL PresentIntervalToString(UINT pi);
44 
45  cIUnkPtr<ID3DSurface> CreateDeviceCursor(const ICONINFO& iconinfo, bool bAddWatermark);
46  HRESULT SetDeviceCursor(HCURSOR hCursor, bool bAddWatermark);
47  };
48 };
49 
50 #endif // _INC_cDXDevice_H
#define GRAY3D_LINK
Definition: Gray3D.h:15
#define GRAYCALL
declare calling convention for static functions so everyone knows the arg passing scheme....
Definition: GrayCore.h:36
INT32 HRESULT
_WIN32 style error codes. INT32
Definition: SysTypes.h:465
D3DDEVTYPE
Definition: UseDX.h:318
enum _D3DFORMAT D3DFORMAT
enum _D3DMULTISAMPLE_TYPE D3DMULTISAMPLE_TYPE
Definition: cDXBase.h:20
Definition: cDXDevice.h:20
cIUnkPtr< ID3DDevice > m_pD3DDev
Definition: cDXDevice.h:26
cXTextureMgr * m_pTexMgr
Manage/cache all the textures loaded for this device. Can be stored on the device or in system memory...
Definition: cDXDevice.h:27
Definition: cXTextureMgr.h:25
Definition: cIUnkPtr.h:32
Definition: IUnknown.h:68
Definition: Gray3D.cpp:12
char GChar_t
My version of TCHAR, _TCHAR.
Definition: StrConst.h:26