Ejemplo n.º 1
0
 //------------------------------------------------------------------------
 void TerrainBatch::destroyGpuVertexBackupData()
 {
     if (mGpuVertexData)
     {
         HardwareVertexBufferSharedPtr destPosbuf = mGpuVertexData->vertexBufferBinding->getBuffer(TerrainTileRender::POSITION_BUFFER);
         
         if ( destPosbuf.isNull() == false )
         {
             destPosbuf->freeSystemMemoryBuffer();
         }
     }  
 }
Ejemplo n.º 2
0
    //------------------------------------------------------------------------
    void TerrainBatch::checkAndUpdateGpuVertexBackupData()
    {
        if ( mGpuVertexData )
        {
            HardwareVertexBufferSharedPtr destPosbuf = mGpuVertexData->vertexBufferBinding->getBuffer(TerrainTileRender::POSITION_BUFFER);
            if ( destPosbuf.isNull() == false )
            {
                destPosbuf->createSystemMemoryBuffer();

                {
                    updateVertexData( mVertexRectInTile );
                }

                destPosbuf->freeSystemMemoryBuffer();
            }
        }
    }