예제 #1
0
        /// <summary>
        /// Render flabellum in modern opengl.
        /// </summary>
        /// <returns></returns>
        public static FlabellumNode Create()
        {
            var vs       = new VertexShader(vertexCode);
            var fs       = new FragmentShader(fragmentCode);
            var provider = new ShaderArray(vs, fs);
            var map      = new AttributeMap();

            map.Add("inPosition", Flabellum.strPosition);
            map.Add("inColor", Flabellum.strColor);
            var model   = new Flabellum();
            var builder = new RenderMethodBuilder(provider, map);
            var node    = new FlabellumNode(model, builder);

            node.Initialize();

            return(node);
        }
예제 #2
0
 private FlabellumRenderer(Flabellum model, IShaderProgramProvider shaderProgramProvider,
                           AttributeMap attributeMap, params GLState[] switches)
     : base(model, shaderProgramProvider, attributeMap, switches)
 {
     this.ModelSize = model.GetModelSize();
 }
예제 #3
0
 private FlabellumNode(Flabellum model, params RenderMethodBuilder[] builders)
     : base(model, builders)
 {
     this.ModelSize = model.GetModelSize();
 }