Small performance optimization.
This commit is contained in:
parent
90dbd52aca
commit
b280ad8c12
@ -352,9 +352,10 @@ void Graphics::render(double time)
|
||||
for(unsigned int i = 0; i<shadowRenderQueue.size(); i++) {
|
||||
bool enqueued = false;
|
||||
for(unsigned int j = 0; j<renderQueue.size(); j++){
|
||||
if (shadowRenderQueue.at(i).currentPriority > std::get<1>(renderQueue.at(j)) && ! enqueued){
|
||||
if (shadowRenderQueue.at(i).currentPriority > std::get<1>(renderQueue.at(j))){
|
||||
renderQueue.at(j) = std::make_tuple(shadowRenderQueue.at(i).light, shadowRenderQueue.at(i).currentPriority, i);
|
||||
enqueued = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
if (enqueued) {
|
||||
|
Loading…
Reference in New Issue
Block a user