17
0
mirror of https://github.com/MaSzyna-EU07/maszyna.git synced 2026-11-08 11:34:19 +01:00

refactor: the Sonar remarks on the material copies taken care of

- the params of a shader named by the type the shader keeps them in
- ranges::any_of and erase_if, with explicit captures
- the weathering set component by component with an index of the
  type of the vector
- the lookups declared in the ifs that use them
- the empty Erase of the base renderer told why it is empty
This commit is contained in:
maj00r
2026-11-06 19:58:24 +01:00
parent 48af69cbf1
commit d232cd0a69
2 changed files with 29 additions and 26 deletions

View File

@@ -60,7 +60,9 @@ public:
// adds supplied vertex data at the end of specified chunk
virtual auto Append(gfx::vertex_array &Vertices, gfx::userdata_array &Userdata, gfx::geometry_handle const &Geometry, int const Type) -> bool = 0;
// empties specified chunk, its handle stays valid to be filled again
virtual void Erase( gfx::geometry_handle const &Geometry ) {}
virtual void Erase( gfx::geometry_handle const & /*Geometry*/ ) {
// a renderer which keeps no chunks of its own has none to empty
}
// provides direct access to index data of specfied chunk
virtual auto Indices( gfx::geometry_handle const &Geometry ) const->gfx::index_array const & = 0;
// provides direct access to vertex data of specfied chunk