Ejemplo n.º 1
0
 public static void DrawLine(Vector3 startPoint, Vector3 endPoint, Color color)
 {
     if (Demo.IsDrawPhase)
     {
         iDrawLine(startPoint, endPoint, color);
     }
     else
     {
         DeferredLine.AddToBuffer(startPoint, endPoint, color);
     }
 }
Ejemplo n.º 2
0
        public static void DrawAll()
        {
            // draw all lines in the buffer
            for (int i = 0; i < _index; i++)
            {
                DeferredLine dl = _deferredLines[i];
                Drawing.iDrawLine(dl._startPoint, dl._endPoint, dl._color);
            }

            // reset buffer index
            _index = 0;
        }
Ejemplo n.º 3
0
        // draw a line with alpha blending
        public static void DrawLineAlpha(Vector3 startPoint, Vector3 endPoint, Color color, float alpha)
        {
            Color c = new Color(color.R, color.G, color.B, (byte)(255.0f * alpha));

            if (Demo.IsDrawPhase)
            {
                iDrawLine(startPoint, endPoint, c);
            }
            else
            {
                DeferredLine.AddToBuffer(startPoint, endPoint, c);
            }
        }
Ejemplo n.º 4
0
 public static void AllDeferredLines()
 {
     DeferredLine.DrawAll();
 }