Blame mono/Diagram/DiaSynfig.cs

777717
/*
777717
    ......... 2015 Ivan Mahonin
777717
777717
    This program is free software: you can redistribute it and/or modify
777717
    it under the terms of the GNU General Public License as published by
777717
    the Free Software Foundation, either version 3 of the License, or
777717
    (at your option) any later version.
777717
777717
    This program is distributed in the hope that it will be useful,
777717
    but WITHOUT ANY WARRANTY; without even the implied warranty of
777717
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
777717
    GNU General Public License for more details.
777717
777717
    You should have received a copy of the GNU General Public License
777717
    along with this program.  If not, see <http: licenses="" www.gnu.org="">.</http:>
777717
*/
777717
777717
using System;
8cb222
using System.Drawing;
8cb222
8cb222
namespace Diagram {
8cb222
    public class DiaSynfig {
8cb222
        public static Diagram build() {
8cb222
            Color colorSW = Color.DarkRed;
8cb222
            Color colorCommon = Color.Black;
8cb222
            Color colorGL = Color.DarkBlue;
8cb222
8cb222
            return new Diagram()
8cb222
                .addBlock(
8cb222
                    @"glContext",
8cb222
                    @"Windowless OpenGL context",
8cb222
                    @"(using EGL)",
8cb222
                    colorGL,
8cb222
                    new string[] { "glStorage" }
8cb222
                )
8cb222
                .addBlock(
8cb222
                    @"glStorage",
8cb222
                    @"Common storage GL resources",
8cb222
                    @"Store handles of context, shaders, textures in the RendererGL class instance",
8cb222
                    colorGL,
8cb222
                    new string[] { "glBlend" }
8cb222
                )
8cb222
                .addBlock(
8cb222
                    @"swBlend",
8cb222
                    @"«Blend Task»",
8cb222
                    @"for Software rendering",
8cb222
                    colorSW,
8cb222
                    new string[] { "cGroup" }
8cb222
                )
8cb222
                .addBlock(
8cb222
                    @"cGroup",
8cb222
                    @"Render «Groups» (Layer_PasteCanvas)",
8cb222
                    @"Build task-trees using «Blend Task» to link tasks of sub-layers.",
8cb222
                    colorCommon,
8cb222
                    new string[] { "swLayer" }
8cb222
                )
8cb222
                .addBlock(
8cb222
                    @"glBlend",
8cb222
                    @"«Blend Task»",
8cb222
                    @"for OpenGL",
8cb222
                    colorGL,
8cb222
                    new string[] { "cAllLayers" }
8cb222
                )
8cb222
                .addBlock(
8cb222
                    @"swLayer",
8cb222
                    @"«Render Layer Task»",
8cb222
                    @"for layers which yet not supports new rendering engine (Software)",
8cb222
                    colorSW,
8cb222
                    new string[] { "cAllLayers" }
8cb222
                )
8cb222
                .addBlock(
8cb222
                    @"cThreadSafe",
8cb222
                    @"Thread-safe rendering",
8cb222
                    @"",
8cb222
                    colorCommon,
8cb222
                    new string[] { "cAllLayers", "swMultithread", "glMultithread" }
8cb222
                )
8cb222
                .addBlock(
8cb222
                    @"cAllLayers",
8cb222
                    @"New rendering for all layers",
8cb222
                    @"",
8cb222
                    colorCommon,
8cb222
                    new string[] { "cFuture" }
8cb222
                )
8cb222
                .addBlock(
8cb222
                    @"swMultithread",
8cb222
                    @"Multithreaded software rendering",
8cb222
                    @"We have dependency tree of rendering tasks, so we can run several tasks at same time.",
8cb222
                    colorSW,
8cb222
                    new string[] { "cFuture" }
8cb222
                )
8cb222
                .addBlock(
8cb222
                    @"glMultithread",
8cb222
                    @"Multithreaded OpenGL rendering (optional)",
8cb222
                    @"There is some restrictions related to hardware acceleration, and multithreading for it will not so effective. PC usually have only one GPU. In best case we can use up to five GPUs - four PCI-x video cards and one integrated video (very expensive!). Also, GPUs uses own memory, so we must remember about transferring data between them.",
8cb222
                    colorGL,
8cb222
                    new string[] { "cFuture" }
8cb222
                )
8cb222
                .addBlock(
8cb222
                    @"cFuture",
8cb222
                    @"Future",
8cb222
                    @"Abstraction layer to provide access to rendering tasks for script language (python, lua, etc…), so we can build task-tree for renderer via external script. By this way we can write layers at python, and connect it dynamically without restarting of SynfigStudio.",
8cb222
                    colorCommon
8cb222
                );
8cb222
        }
8cb222
    }
8cb222
}
8cb222