mirror of
https://github.com/thunderbrewhq/thunderbrew
synced 2025-12-12 03:02:30 +00:00
feat(gx): add initial d3d backend
This commit is contained in:
parent
1ab29701af
commit
2010aa8e4e
6 changed files with 226 additions and 3 deletions
41
src/gx/d3d/CGxDeviceD3d.hpp
Normal file
41
src/gx/d3d/CGxDeviceD3d.hpp
Normal file
|
|
@ -0,0 +1,41 @@
|
|||
#ifndef GX_D3D_C_GX_DEVICE_D3D_HPP
|
||||
#define GX_D3D_C_GX_DEVICE_D3D_HPP
|
||||
|
||||
#include "gx/CGxDevice.hpp"
|
||||
#include <cstdint>
|
||||
#include <d3d9.h>
|
||||
#include <windows.h>
|
||||
|
||||
class CGxDeviceD3d : public CGxDevice {
|
||||
public:
|
||||
// Static functions
|
||||
static int32_t ILoadD3dLib(HINSTANCE& d3dLib, LPDIRECT3D9& d3d);
|
||||
static void IUnloadD3dLib(HINSTANCE& d3dLib, LPDIRECT3D9& d3d);
|
||||
static LRESULT WindowProcD3d(HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam);
|
||||
|
||||
// Member variables
|
||||
ATOM m_hwndClass;
|
||||
int32_t m_ownhwnd;
|
||||
HINSTANCE m_d3dLib;
|
||||
LPDIRECT3D9 m_d3d;
|
||||
LPDIRECT3DDEVICE9 m_d3dDevice;
|
||||
D3DCAPS9 m_d3dCaps;
|
||||
D3DDISPLAYMODE m_desktopDisplayMode;
|
||||
|
||||
// Virtual member functions
|
||||
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 void CapsWindowSize(CRect& dst);
|
||||
virtual void CapsWindowSizeInScreenCoords(CRect& dst);
|
||||
virtual void PoolSizeSet(CGxPool* pool, uint32_t size);
|
||||
virtual void IShaderCreate(CGxShader* shader);
|
||||
virtual int32_t StereoEnabled();
|
||||
|
||||
// Member functions
|
||||
int32_t ICreateD3d();
|
||||
void IDestroyD3d();
|
||||
void IDestroyD3dDevice();
|
||||
};
|
||||
|
||||
#endif
|
||||
Loading…
Add table
Add a link
Reference in a new issue