Improved scheduling of point lights for the render queue by fixing a bug.
This commit is contained in:
parent
819584ef15
commit
e8c1dee3b5
@ -353,6 +353,9 @@ void Graphics::render(double time)
|
||||
bool enqueued = false;
|
||||
for(unsigned int j = 0; j<renderQueue.size(); j++){
|
||||
if (shadowRenderQueue.at(i).currentPriority > std::get<1>(renderQueue.at(j))){
|
||||
if (j<renderQueue.size() - 2) {
|
||||
renderQueue.at(j+1) = renderQueue.at(j);
|
||||
}
|
||||
renderQueue.at(j) = std::make_tuple(shadowRenderQueue.at(i).light, shadowRenderQueue.at(i).currentPriority, i);
|
||||
enqueued = true;
|
||||
break;
|
||||
|
Loading…
Reference in New Issue
Block a user