コード例 #1
0
ファイル: GLCurvyRenderer.cs プロジェクト: shaunvxc/Infamy
 void RenderSpline(CurvySplineBase spl, Color lineColor)
 {
     if (spl && spl.IsInitialized)
     {
         Points = spl.GetApproximation();
         CreateLineMaterial();
         lineMaterial.SetPass(0);
         GL.Begin(GL.LINES);
         GL.Color(lineColor);
         for (int i = 1; i < Points.Length; i++)
         {
             GL.Vertex(Points[i - 1]);
             GL.Vertex(Points[i]);
         }
         GL.End();
     }
 }