Search in sources :

Example 1 with BufferPair

use of org.terasology.engine.rendering.dag.dependencyConnections.BufferPair in project Terasology by MovingBlocks.

the class ModuleRendering method createBufferPair.

protected BufferPair createBufferPair(String primaryBufferName, String secondaryBufferName, ScalingFactors sharedBufferScale, FBO.Type sharedBufferType, FBO.Dimensions scale) {
    FBO buffer1 = generateWithDimensions(new FboConfig(new SimpleUri(providingModule + ":fbo." + primaryBufferName), sharedBufferScale, sharedBufferType).useDepthBuffer().useNormalBuffer().useLightBuffer().useStencilBuffer(), scale);
    FBO buffer2 = generateWithDimensions(new FboConfig(new SimpleUri(providingModule + ":fbo." + secondaryBufferName), sharedBufferScale, sharedBufferType).useDepthBuffer().useNormalBuffer().useLightBuffer().useStencilBuffer(), scale);
    return new BufferPair(buffer1, buffer2);
}
Also used : FBO(org.terasology.engine.rendering.opengl.FBO) FboConfig(org.terasology.engine.rendering.opengl.FboConfig) BufferPair(org.terasology.engine.rendering.dag.dependencyConnections.BufferPair) SimpleUri(org.terasology.engine.core.SimpleUri)

Aggregations

SimpleUri (org.terasology.engine.core.SimpleUri)1 BufferPair (org.terasology.engine.rendering.dag.dependencyConnections.BufferPair)1 FBO (org.terasology.engine.rendering.opengl.FBO)1 FboConfig (org.terasology.engine.rendering.opengl.FboConfig)1