Search in sources :

Example 1 with SwappableFBO

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

the class DisplayResolutionDependentFbo method generateDefaultFBOs.

private void generateDefaultFBOs() {
    FBO gBuffer1 = generateWithDimensions(new FboConfig(new SimpleUri("engine:fbo.gBuffer1"), FULL_SCALE, FBO.Type.HDR).useDepthBuffer().useNormalBuffer().useLightBuffer().useStencilBuffer(), fullScale);
    FBO gBuffer2 = generateWithDimensions(new FboConfig(new SimpleUri("engine:fbo.gBuffer2"), FULL_SCALE, FBO.Type.HDR).useDepthBuffer().useNormalBuffer().useLightBuffer().useStencilBuffer(), fullScale);
    generateWithDimensions(new FboConfig(FINAL_BUFFER, FULL_SCALE, FBO.Type.DEFAULT), fullScale);
    gBufferPair = new SwappableFBO(gBuffer1, gBuffer2);
}
Also used : FBO(org.terasology.engine.rendering.opengl.FBO) SwappableFBO(org.terasology.engine.rendering.opengl.SwappableFBO) FboConfig(org.terasology.engine.rendering.opengl.FboConfig) SwappableFBO(org.terasology.engine.rendering.opengl.SwappableFBO) SimpleUri(org.terasology.engine.core.SimpleUri)

Aggregations

SimpleUri (org.terasology.engine.core.SimpleUri)1 FBO (org.terasology.engine.rendering.opengl.FBO)1 FboConfig (org.terasology.engine.rendering.opengl.FboConfig)1 SwappableFBO (org.terasology.engine.rendering.opengl.SwappableFBO)1