Fixing a bug in the scheduling.

This commit is contained in:
Faerbit 2015-06-03 14:05:57 +02:00
parent 4c40ddd12d
commit 8452d18575

View File

@ -366,7 +366,7 @@ void Graphics::render(double time)
for(unsigned int i = 0; i<shadowRenderQueue.size(); i++) { for(unsigned int i = 0; i<shadowRenderQueue.size(); i++) {
for(unsigned int j = 0; j<renderQueue.size(); j++){ for(unsigned int j = 0; j<renderQueue.size(); j++){
if (shadowRenderQueue.at(i).currentPriority > std::get<1>(renderQueue.at(j))){ if (shadowRenderQueue.at(i).currentPriority > std::get<1>(renderQueue.at(j))){
if (renderQueue.begin() + j != renderQueue.end()) { if (renderQueue.at(j) != renderQueue.back()) {
renderQueue.at(j+1) = renderQueue.at(j); renderQueue.at(j+1) = renderQueue.at(j);
} }
renderQueue.at(j) = std::make_tuple(shadowRenderQueue.at(i).light, shadowRenderQueue.at(i).currentPriority, i); renderQueue.at(j) = std::make_tuple(shadowRenderQueue.at(i).light, shadowRenderQueue.at(i).currentPriority, i);