UnityEngine.Material.SetPass C# (CSharp) Method

SetPass() private method

private SetPass ( int pass ) : bool
pass int
return bool
        public extern bool SetPass(int pass);
        /// <summary>

Usage Example

コード例 #1
0
ファイル: Graph.cs プロジェクト: STOpandthink/Credence
    public static void DrawAnswers(List<Bar> bars, Material material)
    {
        if(bars.Count == 0) return;

        // Draw bar chart.
        GL.PushMatrix();
        material.SetPass(0);
        GL.LoadOrtho();

        // Draw arrows.
        GL.Begin(GL.LINES);
        foreach(Bar bar in bars){
            double barY = System.Math.Min(100.0, bar.y + 0.5);
            Vector3 origin = ConvertToPixel(bar.x, barY);
            Vector3 end = ConvertToPixel(System.Math.Max(barY, m_minX), barY);
            if(System.Math.Abs(bar.x - barY) <= Answer.CLOSE_ENOUGH) continue;
            int arrowSign = System.Math.Sign(end.x - origin.x);
            GL.Color(arrowSign > 0 ? Color.cyan : Color.magenta);
            GLVertex(origin);
            GL.Color(Color.yellow);
            GLVertex(end);
            GLVertex(end + new Vector3(-arrowSign * 10f / Screen.width, 10f / (float)Screen.height, 0f));
            GLVertex(end);
            GLVertex(end + new Vector3(-arrowSign * 10f / Screen.width, -10f / (float)Screen.height, 0f));
            GLVertex(end);
        }
        GL.End();

        DrawAxis(bars);
        GL.PopMatrix();
    }
All Usage Examples Of UnityEngine.Material::SetPass