#ifdef USE_D3D10
extern const D3D10_INPUT_ELEMENT_DESC MeshVertexD3D10Declaration[];
extern const int MeshVertexD3D10DeclarationElements;
class D3D10Mesh : public BaseMesh
{
public:
friend class D3D10GraphicsDevice;
D3D10Mesh();
D3D10Mesh(GraphicsDevice &_GD);
D3D10Mesh(const BaseMesh &O);
D3D10Mesh(const D3D10Mesh &O);
void Allocate(UINT NewVertexCount, UINT NewFaceCount);
~D3D10Mesh();
void FreeMemory();
UINT IndexCount() const;
UINT VertexCount() const;
UINT FaceCount() const;
MeshVertex* Vertices();
DWORD* Indices();
const MeshVertex* Vertices() const;
const DWORD* Indices() const;
D3D10Mesh& operator = (const BaseMesh &O);
D3D10Mesh& operator = (const D3D10Mesh &O);
ID3DX10Mesh* GetMesh() const;
void Render(UINT Subset) const;
void Render() const;
void Optimize();
private:
void Lock() const;
void Commit() const;
void LoadMesh(ID3DX10Mesh* M);
ID3DX10Mesh* _Mesh;
ID3DX10MeshBuffer* _StagingVertexBuffer;
ID3DX10MeshBuffer* _StagingIndexBuffer;
mutable MeshVertex* _Vertices;
mutable DWORD* _Indices;
};
#endif