Rendering points.
Inheritance: PickableRenderer
Exemplo n.º 1
0
        /// <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;
        }
Exemplo n.º 2
0
        /// <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);
        }