private SceneNodeBase GetRootNode() { var group = new GroupNode(); { var node = PyramideNode.Create(); group.Children.Add(node); } { var triangleModel = new TriangleModel(); var node = TriangleNode.Create(); group.Children.Add(node); } return(group); }
public static TriangleNode Create() { var model = new TriangleModel(); var vs = new VertexShader(regularVert); var fs = new FragmentShader(regularFrag); var array = new ShaderArray(vs, fs); var map = new AttributeMap(); map.Add("inPosition", TriangleModel.strPosition); map.Add("inColor", TriangleModel.strColor); var builder = new RenderMethodBuilder(array, map); var node = new TriangleNode(model, TriangleModel.strPosition, builder); node.Initialize(); return(node); }