예제 #1
0
 //-----------------------------------------------------------------------------------
 void ObjectMemoryManager::migrateTo( ObjectData &inOutObjectData, size_t renderQueue,
                                      ObjectMemoryManager *dstObjectMemoryManager )
 {
     ObjectData tmp;
     dstObjectMemoryManager->objectCreated( tmp, renderQueue );
     tmp.copy( inOutObjectData );
     this->objectDestroyed( inOutObjectData, renderQueue );
     inOutObjectData = tmp;
 }
예제 #2
0
    //-----------------------------------------------------------------------------------
    void ObjectMemoryManager::objectMoved( ObjectData &inOutObjectData, size_t oldRenderQueue,
                                            size_t newRenderQueue )
    {
        growToDepth( newRenderQueue );

        ObjectData tmp;
        mMemoryManagers[newRenderQueue].createNewNode( tmp );

        tmp.copy( inOutObjectData );

        ObjectDataArrayMemoryManager &mgr = mMemoryManagers[oldRenderQueue];
        mgr.destroyNode( inOutObjectData );

        inOutObjectData = tmp;
    }