Search in sources :

Example 36 with SimpleUri

use of org.terasology.engine.core.SimpleUri 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)

Example 37 with SimpleUri

use of org.terasology.engine.core.SimpleUri in project Terasology by MovingBlocks.

the class RenderGraph method disconnectOutputFboConnection.

@Deprecated
public void disconnectOutputFboConnection(String nodeUri, int connectionId) {
    Node node = findNode(new SimpleUri(nodeUri));
    disconnectOutputFboConnection(node, connectionId);
}
Also used : SimpleUri(org.terasology.engine.core.SimpleUri)

Example 38 with SimpleUri

use of org.terasology.engine.core.SimpleUri in project Terasology by MovingBlocks.

the class RenderGraph method disconnectInputFbo.

public void disconnectInputFbo(String nodeUri, int connectionId) {
    logger.debug("Attempting disconnection of " + nodeUri + "'s input fbo number " + connectionId);
    Node node = findNode(new SimpleUri(nodeUri));
    if (node != null) {
        ((AbstractNode) node).disconnectInputFbo(connectionId);
    } else {
        throw new RuntimeException("Could not find node named " + nodeUri + " within renderGraph.");
    }
// TODO disconnect from rendergraph if needed
}
Also used : SimpleUri(org.terasology.engine.core.SimpleUri)

Example 39 with SimpleUri

use of org.terasology.engine.core.SimpleUri in project Terasology by MovingBlocks.

the class RenderGraph method reconnectInputToOutput.

public void reconnectInputToOutput(String fromNodeUri, int outputId, Node toNode, int inputId, ConnectionType connectionType, boolean disconnectPrevious) {
    Node fromNode = findNode(new SimpleUri(fromNodeUri));
    if (fromNode == null) {
        fromNode = findAka(fromNodeUri);
        if (fromNode == null) {
            throw new RuntimeException(("No node is associated with URI '" + fromNodeUri + "'"));
        }
    }
    reconnectInputToOutput(fromNode, outputId, toNode, inputId, connectionType, disconnectPrevious);
}
Also used : SimpleUri(org.terasology.engine.core.SimpleUri)

Example 40 with SimpleUri

use of org.terasology.engine.core.SimpleUri in project Terasology by MovingBlocks.

the class RenderGraph method connectFbo.

/**
 * Connect Fbo output of fromNode to toNode's Fbo input.
 * @param toNode Input node
 * @param inputId Number/id of input
 * @param fromNodeUri Output node's Uri (already added to graph)
 * @param outputId Number/id of output
 */
public void connectFbo(String fromNodeUri, int outputId, Node toNode, int inputId) {
    Node fromNode = findNode(new SimpleUri(fromNodeUri));
    connectFbo(toNode, inputId, fromNode, outputId);
}
Also used : SimpleUri(org.terasology.engine.core.SimpleUri)

Aggregations

SimpleUri (org.terasology.engine.core.SimpleUri)51 Name (org.terasology.gestalt.naming.Name)13 Map (java.util.Map)6 ModuleManager (org.terasology.engine.core.module.ModuleManager)6 FBO (org.terasology.engine.rendering.opengl.FBO)6 ModuleEnvironment (org.terasology.gestalt.module.ModuleEnvironment)6 DependencyResolver (org.terasology.gestalt.module.dependencyresolution.DependencyResolver)6 ResolutionResult (org.terasology.gestalt.module.dependencyresolution.ResolutionResult)6 Config (org.terasology.engine.config.Config)5 BindableButton (org.terasology.engine.input.BindableButton)5 Module (org.terasology.gestalt.module.Module)5 Input (org.terasology.input.Input)5 Test (org.junit.jupiter.api.Test)4 RegisterBindButton (org.terasology.engine.input.RegisterBindButton)4 Lists (com.google.common.collect.Lists)3 List (java.util.List)3 Logger (org.slf4j.Logger)3 LoggerFactory (org.slf4j.LoggerFactory)3 GameManifest (org.terasology.engine.game.GameManifest)3 FboConfig (org.terasology.engine.rendering.opengl.FboConfig)3