Ejemplo n.º 1
0
        public static AccumulationNode Create()
        {
            var model = new Sphere();
            RenderMethodBuilder renderBuilder;
            {
                var vs       = new VertexShader(renderVert);
                var fs       = new FragmentShader(renderFrag);
                var provider = new ShaderArray(vs, fs);
                var map      = new AttributeMap();
                map.Add("inPosition", Sphere.strPosition);
                map.Add("inColor", Sphere.strColor);
                var blend = new BlendState(BlendingSourceFactor.SourceAlpha, BlendingDestinationFactor.OneMinusSourceAlpha);
                renderBuilder = new RenderMethodBuilder(provider, map);
            }
            var node = new AccumulationNode(model, renderBuilder);

            node.ModelSize = model.Size;
            node.Initialize();

            return(node);
        }
Ejemplo n.º 2
0
 private SceneNodeBase GetTree()
 {
     return(AccumulationNode.Create());
 }