Changed D3D api to D3D11

Changed mesh to D3D11
Changed material to D3D11 (WIP)
This commit is contained in:
2026-11-23 15:57:28 +01:00
parent 024a283898
commit 85d8830b84
12 changed files with 282 additions and 182 deletions
+11 -4
View File
@@ -1,7 +1,7 @@
#pragma once
#include <d3d9.h>
#include <d3d11.h>
#pragma comment(lib, "d3d9.lib")
#pragma comment(lib, "d3d11.lib")
class Direct3D
{
@@ -11,9 +11,16 @@ public:
void endScene();
void deInit();
IDirect3DDevice9* getDevice() const { return _pD3DDevice; }
ID3D11Device* getDevice() const { return _pD3DDevice; }
ID3D11DeviceContext* getDeviceContext() const { return _pD3DDeviceContext; }
private:
IDirect3DDevice9* _pD3DDevice = nullptr; // our interface for api communication
ID3D11Device* _pD3DDevice = nullptr; // create other api objects, e.g. buffer
ID3D11DeviceContext* _pD3DDeviceContext = nullptr; // customize render pipeline, e.g. set buffer or make draw calls
IDXGISwapChain* _pDXGISwapChain = nullptr; // holds references to front and back buffer and swap them
ID3D11RenderTargetView* _pRenderTargetView = nullptr; // back buffer
ID3D11RasterizerState* _pRasterizerState = nullptr; // customize rasterizer stage
ID3D11DepthStencilView* _pDepthStencilView = nullptr; // depth & stencil buffer
ID3D11DepthStencilState* _pDepthStencilState = nullptr; // customize depth stencil buffering
};