#pragma once #include 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 = {}; };