CSharpGL.Evaluator1DRenderer.DoRender C# (CSharp) Метод

DoRender() защищенный Метод

protected DoRender ( RenderEventArgs arg ) : void
arg RenderEventArgs
Результат void
        protected override void DoRender(RenderEventArgs arg)
        {
            //  Set the projection matrix.(projection and view matrix actually.)
            OpenGL.MatrixMode(OpenGL.GL_PROJECTION);
            OpenGL.LoadIdentity();
            arg.Camera.LegacyProjection();

            //  Set the modelview matrix.(just model matrix actually.)
            OpenGL.MatrixMode(OpenGL.GL_MODELVIEW);
            OpenGL.LoadIdentity();
            this.LegacyTransform();

            //必须在绘制顶点之前开启
            OpenGL.Enable(OpenGL.GL_MAP1_VERTEX_3);

            vec4 color = this.CurveColor.ToVec4();
            OpenGL.Color(color.x, color.y, color.z, color.w);
            this.CurveWidth.On();

            OpenGL.Begin(this.CurveDrawMode);
            float granularity = this.Granularity;
            for (float i = this.MinPercent; i <= this.MaxPercent; i += granularity)
            {
                OpenGL.EvalCoord1f((float)i);
            }
            OpenGL.End();

            this.CurveWidth.Off();
        }