public void RenderInverted(Frame frame, float x, float y, long t, int h, float sx = 1f, float sy = 1f, float sa = 1f, ToolResource tool = null, int p = -1, int c = 0, bool[] visible = null)
        {
            if (frame == null)
            {
                throw new ArgumentNullException("frame");
            }
            if (frame.Count != Nodes.Count)
            {
                return;
            }

            for (int i = Nodes.Count - 1; i >= 0; i--)
            {
                if (visible != null && i < visible.Length && !visible[i])
                {
                    continue;
                }
                var f = frame[i];
                if (i == h)
                {
                    gl.Color4ub(255, 255, 255, 255);
                }
                else
                {
                    gl.Color4ub(255, 255, 255, 150);
                }
                Nodes[i].Render(x + f.OffsetX, y + f.OffsetY, f.Angle, t, sx, sy, sa);
                if (i == p)
                {
                    tool?.Render(x + f.OffsetX, y + f.OffsetY, f.Angle, t, c, null, sx, sy, sa);
                }
            }
        }
        public void Render(Frame frame, float x, float y, long t, float sx = 1f, float sy = 1f, float sa = 1f, ToolResource tool = null, int p = -1, int c = 0, bool[] visible = null)
        {
            if (frame == null)
            {
                throw new ArgumentNullException("frame");
            }
            if (frame.Count != Nodes.Count)
            {
                return;
            }

            for (int i = 0; i < Nodes.Count; i++)
            {
                if (visible != null && i < visible.Length && !visible[i])
                {
                    continue;
                }
                var f = frame[i];
                Nodes[i].Render(x + f.OffsetX, y + f.OffsetY, f.Angle, t, sx, sy, sa);
                if (i == p)
                {
                    tool?.Render(x + f.OffsetX, y + f.OffsetY, f.Angle, t, c, null, sx, sy, sa);
                }
            }
        }