/|\ y | | | ---------------> x (0, 0) 0 2 4 6 8 10 | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 1 3 5 7 9 11 side length is 1.
Inheritance: IBufferable
 /// <summary>
 /// </summary>
 /// <param name="anchor"></param>
 /// <param name="margin"></param>
 /// <param name="size"></param>
 /// <param name="zNear"></param>
 /// <param name="zFar"></param>
 public UIColorPaletteMarkersRenderer(int maxMarkerCount,
     System.Windows.Forms.AnchorStyles anchor, System.Windows.Forms.Padding margin,
     System.Drawing.Size size, int zNear, int zFar)
     : base(anchor, margin, size, zNear, zFar)
 {
     var model = new LinesModel(maxMarkerCount);
     this.Renderer = LinesRenderer.Create(model);
 }
Ejemplo n.º 2
0
        /// <summary>
        /// </summary>
        /// <param name="anchor"></param>
        /// <param name="margin"></param>
        /// <param name="size"></param>
        /// <param name="zNear"></param>
        /// <param name="zFar"></param>
        public UIColorPaletteMarkersRenderer(int maxMarkerCount,
                                             System.Windows.Forms.AnchorStyles anchor, System.Windows.Forms.Padding margin,
                                             System.Drawing.Size size, int zNear, int zFar)
            : base(anchor, margin, size, zNear, zFar)
        {
            var model = new LinesModel(maxMarkerCount);

            this.Renderer = LinesRenderer.Create(model);
        }
Ejemplo n.º 3
0
        public static LinesRenderer Create(LinesModel model)
        {
            var shaderCodes = new ShaderCode[2];

            shaderCodes[0] = new ShaderCode(File.ReadAllText(@"shaders\Lines.vert"), ShaderType.VertexShader);
            shaderCodes[1] = new ShaderCode(File.ReadAllText(@"shaders\Lines.frag"), ShaderType.FragmentShader);
            var map = new PropertyNameMap();

            map.Add("in_Position", LinesModel.position);
            var renderer = new LinesRenderer(model, shaderCodes, map);

            renderer.markerCount = model.markerCount;

            return(renderer);
        }