17
0
mirror of https://github.com/MaSzyna-EU07/maszyna.git synced 2026-11-10 13:43:14 +01:00

fix(render): the matte and tinted copies of a material made again with its season and weather, the primitive of a handle to no chunk told as none

The copies don't update themselves, their names aren't files to read again: after a change of the weather or the season the material got its new textures and its copies kept the old ones. They are made again from it then, under their handles. primitive() of an empty handle or one past the banks read out of the bank list; it gives no_primitive there, -1 from the renderer.
This commit is contained in:
maj00r
2026-11-03 22:00:48 +01:00
parent 89c4555e1e
commit 48af69cbf1
5 changed files with 102 additions and 44 deletions

View File

@@ -145,6 +145,8 @@ public:
// copy of provided material with its specular highlights and reflections damped. returns: handle to the copy, made once per material
material_handle
create_matte( material_handle const Material );
// copy of provided material with its texture tinted to the colour as far as the userdata of the vertices says. returns: handle to
// the copy, made once per material and colour; the material itself when its shader can't tint it
material_handle
create_tinted( material_handle const Material, glm::vec3 const &Colour );
opengl_material const &
@@ -166,6 +168,9 @@ private:
// checks whether specified texture is in the texture bank. returns texture id, or npos.
material_handle
find_in_databank( std::string const &Materialname ) const;
// the matte and tinted copies of the materials changed with the weather or the season made again from them, under their handles
void
update_variants( bool const Weather );
public:
// checks whether specified file exists. returns name of the located file, or empty string.
static std::pair<std::string, std::string>