- see if this fixes color picking

This commit is contained in:
Mark Vejvoda 2013-01-15 03:34:01 +00:00
parent ceedef5200
commit 21f674abd9
1 changed files with 8 additions and 11 deletions

View File

@ -7402,10 +7402,12 @@ vector<Unit *> Renderer::renderUnitsFast(bool renderingShadows, bool colorPickin
const World *world= game->getWorld();
assert(world != NULL);
//assertGl();
VisibleQuadContainerCache &qCache = getQuadCache();
if(qCache.visibleQuadUnitList.empty() == false) {
if(colorPickingSelection == true) {
unitsList.reserve(qCache.visibleQuadUnitList.size());
}
bool modelRenderStarted = false;
for(int visibleUnitIndex = 0;
visibleUnitIndex < qCache.visibleQuadUnitList.size(); ++visibleUnitIndex) {
@ -7506,13 +7508,12 @@ vector<Object *> Renderer::renderObjectsFast(bool renderingShadows, bool resour
return objectList;
}
//const World *world= game->getWorld();
//const Map *map= world->getMap();
assertGl();
VisibleQuadContainerCache &qCache = getQuadCache();
if(qCache.visibleObjectList.empty() == false) {
if(colorPickingSelection == true) {
objectList.reserve(qCache.visibleObjectList.size());
}
bool modelRenderStarted = false;
for(int visibleIndex = 0;
visibleIndex < qCache.visibleObjectList.size(); ++visibleIndex) {
@ -7575,8 +7576,6 @@ vector<Object *> Renderer::renderObjectsFast(bool renderingShadows, bool resour
if(colorPickingSelection == true) {
o->setUniquePickingColor();
objectList.push_back(o);
//assertGl();
}
modelRenderer->render(objModel,resourceOnly?rmSelection:rmNormal);
@ -7598,8 +7597,6 @@ vector<Object *> Renderer::renderObjectsFast(bool renderingShadows, bool resour
}
}
assertGl();
return objectList;
}