1
0
Fork 0
mirror of https://github.com/luanti-org/luanti.git synced 2025-06-27 16:36:03 +00:00

Split CIndexBuffer from CMeshBuffer

This commit is contained in:
sfan5 2024-08-27 17:40:29 +02:00
parent 5d6e15bc49
commit 47e4c33a50
13 changed files with 197 additions and 104 deletions

View file

@ -27,16 +27,17 @@ CBillboardSceneNode::CBillboardSceneNode(ISceneNode *parent, ISceneManager *mgr,
setSize(size);
auto &Vertices = Buffer->Vertices->Data;
auto &Indices = Buffer->Indices->Data;
Vertices.resize(4);
Buffer->Indices.resize(6);
Indices.resize(6);
Buffer->Indices[0] = 0;
Buffer->Indices[1] = 2;
Buffer->Indices[2] = 1;
Buffer->Indices[3] = 0;
Buffer->Indices[4] = 3;
Buffer->Indices[5] = 2;
Indices[0] = 0;
Indices[1] = 2;
Indices[2] = 1;
Indices[3] = 0;
Indices[4] = 3;
Indices[5] = 2;
Vertices[0].TCoords.set(1.0f, 1.0f);
Vertices[0].Color = colorBottom;