@@ -0,0 +1,2232 @@
+/*%0A * Copyright 2019 MovingBlocks%0A *%0A * Licensed under the Apache License, Version 2.0 (the %22License%22);%0A * you may not use this file except in compliance with the License.%0A * You may obtain a copy of the License at%0A *%0A *      http://www.apache.org/licenses/LICENSE-2.0%0A *%0A * Unless required by applicable law or agreed to in writing, software%0A * distributed under the License is distributed on an %22AS IS%22 BASIS,%0A * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.%0A * See the License for the specific language governing permissions and%0A * limitations under the License.%0A */%0A%0Apackage org.terasology.rendering.dag.gsoc;%0A%0Aimport javafx.util.Pair;%0Aimport org.terasology.engine.SimpleUri;%0Aimport org.terasology.rendering.opengl.FBO;%0A%0Apublic class BufferPairConnection extends DependencyConnection%3CPair%3CFBO,FBO%3E%3E %7B%0A%0A    /**%0A     *%0A     * @param name%0A     * @param type%0A     * @param parentNode%0A     */%0A    public BufferPairConnection(String name, Type type, SimpleUri parentNode) %7B%0A        super(name, type, parentNode);%0A    %7D%0A%0A    /**%0A     *%0A     * @param name%0A     * @param type%0A     * @param data%0A     * @param parentNode%0A     */%0A    public BufferPairConnection(String name, Type type, Pair%3CFBO,FBO%3E data, SimpleUri parentNode) %7B%0A        super(name, type, parentNode);%0A        super.setData(data);%0A    %7D%0A%0A    /**%0A     * Return a new instance of BufferPairConnection based on this one with swapped FBOs.%0A     * @param newName%0A     * @param type%0A     * @param parentNode%0A     * @return%0A     */%0A    public BufferPairConnection copySwapped(String newName, Type type, SimpleUri parentNode) %7B%0A        Pair%3CFBO,FBO%3E bufferPairToCopy = super.getData();%0A        Pair%3CFBO,FBO%3E newBufferPair =  new Pair%3C%3E(bufferPairToCopy.getValue(), bufferPairToCopy.getKey());%0A        return new BufferPairConnection(newName, type, newBufferPair, parentNode);%0A    %7D%0A%0A    public FBO getPrimaryFbo() %7B%0A        return super.getData().getKey();%0A    %7D%0A%0A    public FBO getSecondaryFbo() %7B%0A        return super.getData().getValue();%0A    %7D%0A%0A    public String toString() %7B%0A        return super.toString();%0A    %7D%0A%0A    public static String getConnectionName(int number) %7B%0A        return new StringBuilder(%22FBO%22).append(number).toString();%0A    %7D%0A%0A%7D%0A

add BufferPairConnection draft