mirror of
https://github.com/MaSzyna-EU07/maszyna.git
synced 2026-11-08 10:31:01 +01:00
feat(render): a geometry chunk emptied in place, the kind of its primitive told; a chunk gaining or losing its userdata gets a new buffer
Erase() empties a chunk and keeps its handle to be filled again, for geometry made anew as it changes. Primitive() tells whether a chunk holds triangles or strips, -1 from a renderer which doesn't know. The VAO bank reused the buffer of a chunk of the same length even when the userdata came or went, the layout of the buffer differing then.
This commit is contained in:
@@ -65,6 +65,7 @@ public:
|
||||
bool Replace(gfx::vertex_array &Vertices, gfx::userdata_array &Userdata, gfx::geometry_handle const &Geometry, int const Type, const std::size_t Offset = 0) override;
|
||||
// adds supplied vertex data at the end of specified chunk
|
||||
bool Append(gfx::vertex_array &Vertices, gfx::userdata_array &Userdata, gfx::geometry_handle const &Geometry, int const Type) override;
|
||||
void Erase( gfx::geometry_handle const &Geometry ) override;
|
||||
// provides direct access to index data of specfied chunk
|
||||
gfx::index_array const &
|
||||
Indices( gfx::geometry_handle const &Geometry ) const override;
|
||||
|
||||
Reference in New Issue
Block a user