16
0
mirror of https://github.com/MaSzyna-EU07/maszyna.git synced 2026-07-19 14:39:18 +02:00

load submodel visibility tweaks

This commit is contained in:
tmj-fstate
2018-02-21 23:11:10 +01:00
parent e5967f72e0
commit 40e77acb69
6 changed files with 151 additions and 66 deletions

View File

@@ -725,6 +725,25 @@ void TSubModel::NextAdd(TSubModel *SubModel)
Next = SubModel;
};
int TSubModel::count_siblings() {
auto siblingcount { 0 };
auto *sibling { Next };
while( sibling != nullptr ) {
++siblingcount;
sibling = sibling->Next;
}
return siblingcount;
}
int TSubModel::count_children() {
return (
Child == nullptr ?
0 :
1 + Child->count_siblings() );
}
int TSubModel::FlagsCheck()
{ // analiza koniecznych zmian pomiędzy submodelami
// samo pomijanie glBindTexture() nie poprawi wydajności