17
0
mirror of https://github.com/MaSzyna-EU07/maszyna.git synced 2026-11-11 16:57:12 +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

@@ -2225,7 +2225,8 @@ gfx::userdata_array const &opengl33_renderer::UserData(const gfx::geometry_handl
int opengl33_renderer::Primitive(gfx::geometry_handle const &Geometry) const
{
return static_cast<int>(m_geometry.primitive(Geometry));
auto const primitive{m_geometry.primitive(Geometry)};
return primitive == gfx::geometry_bank::no_primitive ? -1 : static_cast<int>(primitive);
}
// material methods