mirror of
https://github.com/overte-org/overte.git
synced 2025-08-06 18:50:00 +02:00
small optimization
This commit is contained in:
parent
148b880bb1
commit
47f5d499f6
1 changed files with 5 additions and 0 deletions
|
@ -1563,6 +1563,11 @@ int Model::renderMeshes(RenderMode mode, bool translucent, float alphaThreshold,
|
||||||
}
|
}
|
||||||
QVector<int>& list = *whichList;
|
QVector<int>& list = *whichList;
|
||||||
|
|
||||||
|
// If this list has nothing to render, then don't bother proceeding. This saves us on binding to programs
|
||||||
|
if (list.size() == 0) {
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
ProgramObject* program = &_program;
|
ProgramObject* program = &_program;
|
||||||
Locations* locations = &_locations;
|
Locations* locations = &_locations;
|
||||||
ProgramObject* skinProgram = &_skinProgram;
|
ProgramObject* skinProgram = &_skinProgram;
|
||||||
|
|
Loading…
Reference in a new issue