add d3d9 project structure

This commit is contained in:
2025-09-03 14:55:06 +02:00
parent 9e336c5677
commit 9477404436
21 changed files with 1137 additions and 0 deletions
+25
View File
@@ -0,0 +1,25 @@
#pragma once
#include <d3d9.h>
class Mesh
{
public:
UINT init(IDirect3DDevice9* pD3DDevice);
void update(FLOAT dt);
void render(IDirect3DDevice9* pD3DDevice);
void deInit();
private:
UINT createVertexBuffer(IDirect3DDevice9* pD3DDevice);
UINT createIndexBuffer(IDirect3DDevice9* pD3DDevice);
IDirect3DVertexBuffer9* _pVertexBuffer = nullptr; // dumps mesh vertices
IDirect3DIndexBuffer9* _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
D3DMATRIX _worldMatrix = {};
};