feat(gx): create d3d device in d3d backend

This commit is contained in:
fallenoak 2023-03-05 19:49:29 -06:00 committed by GitHub
parent c05ac69273
commit f6d768ac59
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 106 additions and 1 deletions

View file

@ -8,6 +8,9 @@
class CGxDeviceD3d : public CGxDevice {
public:
// Static variables
static D3DFORMAT s_GxFormatToD3dFormat[];
// Static functions
static int32_t ILoadD3dLib(HINSTANCE& d3dLib, LPDIRECT3D9& d3d);
static void IUnloadD3dLib(HINSTANCE& d3dLib, LPDIRECT3D9& d3d);
@ -21,6 +24,7 @@ class CGxDeviceD3d : public CGxDevice {
LPDIRECT3D9 m_d3d = nullptr;
LPDIRECT3DDEVICE9 m_d3dDevice = nullptr;
D3DCAPS9 m_d3dCaps;
int32_t m_d3dIsHwDevice = 0;
D3DDISPLAYMODE m_desktopDisplayMode;
// Virtual member functions
@ -38,6 +42,7 @@ class CGxDeviceD3d : public CGxDevice {
int32_t ICreateD3d();
int32_t ICreateD3dDevice(const CGxFormat& format);
bool ICreateWindow(CGxFormat& format);
void ISetPresentParms(D3DPRESENT_PARAMETERS& d3dpp, const CGxFormat& format);
void IDestroyD3d();
void IDestroyD3dDevice();
};