Added: D3D11 project

This commit is contained in:
2026-09-29 22:45:21 +02:00
parent dd2c2ef3b2
commit cfd2960180
21 changed files with 1247 additions and 0 deletions
+29
View File
@@ -0,0 +1,29 @@
#pragma once
#include <d3d11.h>
#include <DirectXMath.h>
using namespace DirectX;
class Mesh
{
public:
UINT init(ID3D11Device* pD3DDevice);
void update(FLOAT dt);
void render(ID3D11DeviceContext* pD3DDeviceContext);
void deInit();
const XMFLOAT4X4& getWorldMatrix() const { return _worldMatrix; }
private:
UINT createVertexBuffer(ID3D11Device* pD3DDevice);
UINT createIndexBuffer(ID3D11Device* pD3DDevice);
ID3D11Buffer* _pVertexBuffer = nullptr; // dumps mesh vertices
ID3D11Buffer* _pIndexBuffer = nullptr; // dumps mesh indices
UINT _vertexCount = 0; // amount of vertices
UINT _vertexStride = 0; // size of one vertex in bytes
UINT _indexCount = 0; // amount of indices
XMFLOAT4X4 _worldMatrix = {};
};