Search in sources :

Example 1 with BaseFboManager

use of org.terasology.engine.rendering.opengl.BaseFboManager in project Terasology by MovingBlocks.

the class AbstractNode method dispose.

/**
 * Inheriting classes must call this method to ensure that any FBO requested and acquired by a node
 * is automatically released upon the node's disposal. This way FBOs that aren't used by any node
 * are also disposed.
 */
@Override
public void dispose() {
    for (Map.Entry<SimpleUri, BaseFboManager> entry : fboUsages.entrySet()) {
        SimpleUri fboName = entry.getKey();
        BaseFboManager baseFboManager = entry.getValue();
        baseFboManager.release(fboName);
    }
    fboUsages.clear();
}
Also used : SimpleUri(org.terasology.engine.core.SimpleUri) Map(java.util.Map) BaseFboManager(org.terasology.engine.rendering.opengl.BaseFboManager)

Aggregations

Map (java.util.Map)1 SimpleUri (org.terasology.engine.core.SimpleUri)1 BaseFboManager (org.terasology.engine.rendering.opengl.BaseFboManager)1