Refactor models and meshes to share more code in a base class

This commit is contained in:
Wojtek Figat
2024-12-19 00:20:08 +01:00
parent 8eaa906e0c
commit 1bf29c042b
18 changed files with 842 additions and 1197 deletions

View File

@@ -31,12 +31,12 @@ public:
}
template<typename IndexType>
void Init(uint32 vertices, uint32 triangles, Float3* positions, IndexType* indices)
void Init(uint32 vertices, uint32 triangles, const Float3* positions, const IndexType* indices)
{
Triangles.Clear();
Triangles.EnsureCapacity(triangles, false);
IndexType* it = indices;
const IndexType* it = indices;
for (uint32 i = 0; i < triangles; i++)
{
auto i0 = *(it++);