BGE: restore a feature that was lost in 2.48: sharing of display lists between duplicated objects.

This commit is contained in:
Benoit Bolsee
2009-04-18 09:14:51 +00:00
parent df8cf26404
commit 53fd3847bc
4 changed files with 11 additions and 9 deletions

View File

@@ -136,10 +136,10 @@ RAS_ListSlot* RAS_ListRasterizer::FindOrAdd(RAS_MeshSlot& ms)
*/
RAS_ListSlot* localSlot = (RAS_ListSlot*)ms.m_DisplayList;
if(!localSlot) {
RAS_Lists::iterator it = mLists.find(&ms);
RAS_Lists::iterator it = mLists.find(ms.m_displayArrays);
if(it == mLists.end()) {
localSlot = new RAS_ListSlot(this);
mLists.insert(std::pair<RAS_MeshSlot*, RAS_ListSlot*>(&ms, localSlot));
mLists.insert(std::pair<RAS_DisplayArrayList, RAS_ListSlot*>(ms.m_displayArrays, localSlot));
} else {
localSlot = static_cast<RAS_ListSlot*>(it->second->AddRef());
}