feat(gx): add window creation to d3d backend

This commit is contained in:
fallenoak 2023-03-05 16:13:31 -06:00 committed by GitHub
parent 2010aa8e4e
commit 80388f0279
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
5 changed files with 98 additions and 2 deletions

View file

@ -14,6 +14,7 @@ class CGxDeviceD3d : public CGxDevice {
static LRESULT WindowProcD3d(HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam);
// Member variables
HWND m_hwnd;
ATOM m_hwndClass;
int32_t m_ownhwnd;
HINSTANCE m_d3dLib;
@ -26,6 +27,7 @@ class CGxDeviceD3d : public CGxDevice {
virtual void ITexMarkAsUpdated(CGxTex* texId);
virtual void IRsSendToHw(EGxRenderState rs);
virtual int32_t DeviceCreate(long (*windowProc)(void*, uint32_t, uint32_t, long), const CGxFormat& format);
virtual int32_t DeviceSetFormat(const CGxFormat& format);
virtual void CapsWindowSize(CRect& dst);
virtual void CapsWindowSizeInScreenCoords(CRect& dst);
virtual void PoolSizeSet(CGxPool* pool, uint32_t size);
@ -34,6 +36,8 @@ class CGxDeviceD3d : public CGxDevice {
// Member functions
int32_t ICreateD3d();
int32_t ICreateD3dDevice(const CGxFormat& format);
bool ICreateWindow(CGxFormat& format);
void IDestroyD3d();
void IDestroyD3dDevice();
};