26 lines
628 B
C++
26 lines
628 B
C++
#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 = {};
|
|
};
|
|
|