mirror of
https://github.com/MihailRis/voxelcore.git
synced 2026-10-04 18:41:51 +00:00
update Mesh from MeshData constructor
This commit is contained in:
parent
5c6b73ee2b
commit
cc37fa57f1
1 changed files with 2 additions and 0 deletions
|
|
@ -15,6 +15,8 @@ inline size_t calc_vertex_size(const vattr* attrs) {
|
|||
Mesh::Mesh(const MeshData& data)
|
||||
: Mesh(data.vertices.data(),
|
||||
data.vertices.size() / calc_vertex_size(data.attrs.data()),
|
||||
data.indices.data(),
|
||||
data.indices.size(),
|
||||
data.attrs.data()) {}
|
||||
|
||||
Mesh::Mesh(const float* vertexBuffer, size_t vertices, const int* indexBuffer, size_t indices, const vattr* attrs) :
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue