@@ -36,21 +36,20 @@ class CHW
36
36
BOOL support (D3DFORMAT fmt, DWORD type, DWORD usage);
37
37
#endif // !USE_OGL
38
38
39
- #ifdef DEBUG
40
- #if defined(USE_DX10) || defined(USE_DX11) || defined(USE_OGL)
41
- void Validate (void ){};
42
- #else // USE_DX10
43
- void Validate (void )
39
+ #if defined(DEBUG) && defined(USE_DX9)
40
+ void Validate ()
44
41
{
45
42
VERIFY (pDevice);
46
43
VERIFY (pD3D);
47
44
};
48
- #endif // USE_DX10
49
45
#else
50
- void Validate (void ){};
46
+ void Validate () {}
51
47
#endif
52
48
53
- // Variables section
49
+ // Variables section
50
+ public:
51
+ CHWCaps Caps;
52
+
54
53
#if defined(USE_OGL)
55
54
CHW* pDevice;
56
55
CHW* pContext;
@@ -61,62 +60,40 @@ class CHW
61
60
GLuint pFB;
62
61
GLuint pCFB;
63
62
64
- CHWCaps Caps;
65
-
66
63
SDL_Window* m_hWnd;
67
64
HDC m_hDC;
68
65
SDL_GLContext m_hRC;
69
- #elif defined(USE_DX11)
70
- public:
71
- IDXGIFactory1* m_pFactory = nullptr ;
72
- IDXGIAdapter1* m_pAdapter = nullptr ; // pD3D equivalent
73
- ID3D11Device* pDevice = nullptr ; // combine with DX9 pDevice via typedef
74
- ID3D11DeviceContext* pContext = nullptr ; // combine with DX9 pDevice via typedef
75
- IDXGISwapChain* m_pSwapChain = nullptr ;
76
- ID3D11RenderTargetView* pBaseRT = nullptr ; // combine with DX9 pBaseRT via typedef
77
- ID3D11DepthStencilView* pBaseZB = nullptr ;
78
-
79
- CHWCaps Caps;
66
+ #else // General DirectX
67
+ ID3DDevice* pDevice = nullptr ; // render device
68
+ ID3DRenderTargetView* pBaseRT = nullptr ; // base render target
69
+ ID3DDepthStencilView* pBaseZB = nullptr ; // base depth-stencil buffer
80
70
81
71
D3D_DRIVER_TYPE m_DriverType;
82
- DXGI_SWAP_CHAIN_DESC m_ChainDesc; // DevPP equivalent
83
- D3D_FEATURE_LEVEL FeatureLevel;
84
- #elif defined(USE_DX10)
85
- public:
72
+ #ifndef USE_DX9
86
73
IDXGIFactory1* m_pFactory = nullptr ;
87
- IDXGIAdapter1* m_pAdapter = nullptr ; // pD3D equivalent
88
- ID3D10Device1* pDevice1 = nullptr ; // combine with DX9 pDevice via typedef
89
- ID3D10Device* pDevice = nullptr ; // combine with DX9 pDevice via typedef
90
- ID3D10Device1* pContext1 = nullptr ; // combine with DX9 pDevice via typedef
91
- ID3D10Device* pContext = nullptr ; // combine with DX9 pDevice via typedef
74
+ IDXGIAdapter1* m_pAdapter = nullptr ; // pD3D equivalent
75
+ ID3DDeviceContext* pContext = nullptr ;
92
76
IDXGISwapChain* m_pSwapChain = nullptr ;
93
- ID3D10RenderTargetView* pBaseRT = nullptr ; // combine with DX9 pBaseRT via typedef
94
- ID3D10DepthStencilView* pBaseZB = nullptr ;
95
-
96
- CHWCaps Caps;
97
-
98
- D3D10_DRIVER_TYPE m_DriverType;
99
- DXGI_SWAP_CHAIN_DESC m_ChainDesc; // DevPP equivalent
77
+ DXGI_SWAP_CHAIN_DESC m_ChainDesc; // DevPP equivalent
100
78
D3D_FEATURE_LEVEL FeatureLevel;
101
- #else
102
- private:
79
+ #if defined(USE_DX10)
80
+ ID3D10Device1* pDevice1 = nullptr ;
81
+ ID3D10Device1* pContext1 = nullptr ;
82
+ #endif
83
+ #else // USE_DX9
103
84
#ifdef DEBUG
104
85
IDirect3DStateBlock9* dwDebugSB = nullptr ;
105
86
#endif
87
+ private:
106
88
XRay::Module hD3D = nullptr ;
107
89
108
90
public:
109
91
IDirect3D9* pD3D = nullptr ; // D3D
110
- IDirect3DDevice9* pDevice = nullptr ; // render device
111
- IDirect3DSurface9* pBaseRT = nullptr ;
112
- IDirect3DSurface9* pBaseZB = nullptr ;
113
-
114
- CHWCaps Caps;
115
92
116
93
UINT DevAdapter;
117
- D3DDEVTYPE m_DriverType;
118
94
D3DPRESENT_PARAMETERS DevPP;
119
- #endif // USE_DX10
95
+ #endif // USE_DX9
96
+ #endif // USE_OGL
120
97
121
98
#if !defined(_MAYA_EXPORT) && !defined(USE_OGL)
122
99
stats_manager stats_manager;
0 commit comments