コード例 #1
0
        /// <summary>
        /// Render propeller in modern opengl.
        /// </summary>
        /// <returns></returns>
        public static PropellerRenderer Create()
        {
            var vertexShader   = new VertexShader(vertexCode, "inPositoin", "inColor");
            var fragmentShader = new FragmentShader(fragmentCode);
            var provider       = new ShaderArray(vertexShader, fragmentShader);
            var map            = new AttributeMap();

            map.Add("inPosition", Propeller.strPosition);
            map.Add("inColor", Propeller.strColor);
            var renderer = new PropellerRenderer(new Propeller(), provider, map);

            renderer.Initialize();

            return(renderer);
        }
コード例 #2
0
        /// <summary>
        /// Render propeller in modern opengl.
        /// </summary>
        /// <returns></returns>
        public static PropellerRenderer Create()
        {
            var vs       = new VertexShader(vertexCode);
            var fs       = new FragmentShader(fragmentCode);
            var provider = new ShaderArray(vs, fs);
            var map      = new AttributeMap();

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

            node.Initialize();

            return(node);
        }