mirror of
https://github.com/MaSzyna-EU07/maszyna.git
synced 2026-11-08 13:19:17 +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:
@@ -378,6 +378,8 @@ geometry_bank::vertices( gfx::geometry_handle const &Geometry ) const {
|
||||
unsigned int
|
||||
geometry_bank::primitive( gfx::geometry_handle const &Geometry ) const {
|
||||
|
||||
if( ( Geometry.chunk == 0 ) || ( Geometry.chunk > m_chunks.size() ) ) { return no_primitive; }
|
||||
|
||||
return geometry_bank::chunk( Geometry ).type;
|
||||
}
|
||||
|
||||
@@ -516,6 +518,8 @@ geometrybank_manager::vertices( gfx::geometry_handle const &Geometry ) const {
|
||||
unsigned int
|
||||
geometrybank_manager::primitive( gfx::geometry_handle const &Geometry ) const {
|
||||
|
||||
if( ( Geometry.bank == 0 ) || ( Geometry.bank > m_geometrybanks.size() ) ) { return geometry_bank::no_primitive; }
|
||||
|
||||
return bank( Geometry ).first->primitive( Geometry );
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user