mirror of
https://github.com/luanti-org/luanti.git
synced 2025-10-05 19:31:04 +00:00
Split CVertexBuffer from CMeshBuffer
This commit is contained in:
parent
538b8b9b34
commit
5d6e15bc49
10 changed files with 246 additions and 78 deletions
|
@ -134,16 +134,17 @@ Hud::Hud(Client *client, LocalPlayer *player,
|
|||
|
||||
// Prepare mesh for compass drawing
|
||||
auto &b = m_rotation_mesh_buffer;
|
||||
b.Vertices.resize(4);
|
||||
auto &vertices = b.Vertices->Data;
|
||||
vertices.resize(4);
|
||||
b.Indices.resize(6);
|
||||
|
||||
video::SColor white(255, 255, 255, 255);
|
||||
v3f normal(0.f, 0.f, 1.f);
|
||||
|
||||
b.Vertices[0] = video::S3DVertex(v3f(-1.f, -1.f, 0.f), normal, white, v2f(0.f, 1.f));
|
||||
b.Vertices[1] = video::S3DVertex(v3f(-1.f, 1.f, 0.f), normal, white, v2f(0.f, 0.f));
|
||||
b.Vertices[2] = video::S3DVertex(v3f( 1.f, 1.f, 0.f), normal, white, v2f(1.f, 0.f));
|
||||
b.Vertices[3] = video::S3DVertex(v3f( 1.f, -1.f, 0.f), normal, white, v2f(1.f, 1.f));
|
||||
vertices[0] = video::S3DVertex(v3f(-1.f, -1.f, 0.f), normal, white, v2f(0.f, 1.f));
|
||||
vertices[1] = video::S3DVertex(v3f(-1.f, 1.f, 0.f), normal, white, v2f(0.f, 0.f));
|
||||
vertices[2] = video::S3DVertex(v3f( 1.f, 1.f, 0.f), normal, white, v2f(1.f, 0.f));
|
||||
vertices[3] = video::S3DVertex(v3f( 1.f, -1.f, 0.f), normal, white, v2f(1.f, 1.f));
|
||||
|
||||
b.Indices[0] = 0;
|
||||
b.Indices[1] = 1;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue