mirror of
https://github.com/HifiExperiments/overte.git
synced 2025-08-09 09:37:14 +02:00
Merge pull request #3609 from ZappoMan/groupMaterialsRendering
small optimization to model rendering
This commit is contained in:
commit
a46610a7c1
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