16
0
mirror of https://github.com/MaSzyna-EU07/maszyna.git synced 2026-07-22 08:09:19 +02:00

move vertex user data to a separate array

update vao creation to support optional vertex data
update mesh serialization to account for new user data location
change t3d spec: userdata:{float|uint|int} to userdata:bool
This commit is contained in:
Wls50
2024-07-06 16:04:35 +02:00
parent dba0a035fd
commit 561b84a329
18 changed files with 374 additions and 229 deletions

View File

@@ -97,6 +97,7 @@ public:
glm::dvec3 origin; // world position of the relative coordinate system origin
gfx::geometry_handle geometry { 0, 0 }; // relative origin-centered chunk of geometry held by gfx renderer
std::vector<world_vertex> vertices; // world space source data of the geometry
gfx::userdata_array userdata;
// methods:
// sends content of the struct to provided stream
void
@@ -192,6 +193,7 @@ public:
glm::dvec3 origin; // world position of the relative coordinate system origin
gfx::geometry_handle geometry { 0, 0 }; // relative origin-centered chunk of geometry held by gfx renderer
std::vector<world_vertex> vertices; // world space source data of the geometry
gfx::userdata_array userdata;
// methods:
// sends content of the struct to provided stream
void