use of org.terasology.rendering.opengl.LwjglFrameBufferObject in project Terasology by MovingBlocks.
the class LwjglCanvasRenderer method getFBO.
@Override
public FrameBufferObject getFBO(ResourceUrn urn, BaseVector2i size) {
LwjglFrameBufferObject frameBufferObject = fboMap.get(urn);
if (frameBufferObject == null || !Assets.getTexture(urn).isPresent()) {
// TODO: update fboMap whenever a texture is disposed (or convert FBO instances to assets?)
if (frameBufferObject != null) {
frameBufferObject.dispose();
}
frameBufferObject = new LwjglFrameBufferObject(urn, size);
fboMap.put(urn, frameBufferObject);
}
return frameBufferObject;
}
Aggregations