BGE: restore a feature that was lost in 2.48: sharing of display lists between duplicated objects.
This commit is contained in:
@@ -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());
|
||||
}
|
||||
|
@@ -35,7 +35,7 @@ enum RAS_ListSlotFlags {
|
||||
LIST_REGEN =64
|
||||
};
|
||||
|
||||
typedef std::map<class RAS_MeshSlot*, RAS_ListSlot*> RAS_Lists;
|
||||
typedef std::map<RAS_DisplayArrayList, RAS_ListSlot*> RAS_Lists;
|
||||
|
||||
class RAS_ListRasterizer : public RAS_VAOpenGLRasterizer
|
||||
{
|
||||
|
Reference in New Issue
Block a user