/// <summary> /// /// </summary> /// <param name="model"></param> /// <returns></returns> public static PointsRenderer Create(Points model) { var shaderCodes = new ShaderCode[2]; shaderCodes[0] = new ShaderCode(ManifestResourceLoader.LoadTextFile(@"Resources\Points.vert"), ShaderType.VertexShader); shaderCodes[1] = new ShaderCode(ManifestResourceLoader.LoadTextFile(@"Resources\Points.frag"), ShaderType.FragmentShader); var map = new CSharpGL.AttributeMap(); map.Add("in_Position", Points.strposition); var renderer = new PointsRenderer(model, shaderCodes, map, Points.strposition); renderer.ModelSize = model.Lengths; renderer.WorldPosition = model.WorldPosition; renderer.stateList.Add(new PointSizeState(10)); return renderer; }
/// <summary> /// /// </summary> /// <param name="model"></param> /// <returns></returns> public static PointsRenderer Create(Points model) { var shaderCodes = new ShaderCode[2]; shaderCodes[0] = new ShaderCode(ManifestResourceLoader.LoadTextFile(@"Resources\Points.vert"), ShaderType.VertexShader); shaderCodes[1] = new ShaderCode(ManifestResourceLoader.LoadTextFile(@"Resources\Points.frag"), ShaderType.FragmentShader); var map = new CSharpGL.AttributeMap(); map.Add("in_Position", Points.strposition); var renderer = new PointsRenderer(model, shaderCodes, map, Points.strposition); renderer.ModelSize = model.Lengths; renderer.WorldPosition = model.WorldPosition; renderer.stateList.Add(new PointSizeState(10)); return(renderer); }