public static void RenderTexture(Rect r, Texture mainTex, Texture mask, Color color, bool flipVertical)
        {
            ClipRenderer.Initialize();
            ClipRenderer.s_Vertices[0] = new Vector3(r.get_xMin(), r.get_yMin(), 0f);
            ClipRenderer.s_Vertices[1] = new Vector3(r.get_xMax(), r.get_yMin(), 0f);
            ClipRenderer.s_Vertices[2] = new Vector3(r.get_xMax(), r.get_yMax(), 0f);
            ClipRenderer.s_Vertices[3] = new Vector3(r.get_xMin(), r.get_yMax(), 0f);
            ClipRenderer.s_Quad.set_vertices(ClipRenderer.s_Vertices);
            float num  = 0f;
            float num2 = 1f;

            if (flipVertical)
            {
                num  = 1f;
                num2 = 0f;
            }
            ClipRenderer.s_UVs[0] = new Vector2(0f, num2);
            ClipRenderer.s_UVs[1] = new Vector2(1f, num2);
            ClipRenderer.s_UVs[2] = new Vector2(1f, num);
            ClipRenderer.s_UVs[3] = new Vector2(0f, num);
            ClipRenderer.s_Quad.set_uv(ClipRenderer.s_UVs);
            ClipRenderer.s_BlendMaterial.SetTexture("_MainTex", mainTex);
            ClipRenderer.s_BlendMaterial.SetTexture("_MaskTex", mask);
            ClipRenderer.s_BlendMaterial.SetColor("_Color", color);
            ClipRenderer.s_BlendMaterial.SetPass(0);
            Graphics.DrawMeshNow(ClipRenderer.s_Quad, Handles.get_matrix());
        }
 public static void RenderTexture(Rect r, GUIStyle style, Color color)
 {
     ClipRenderer.Initialize();
     ClipRenderer.s_Vertices[0] = new Vector3(r.get_xMin(), r.get_yMin(), 0f);
     ClipRenderer.s_Vertices[1] = new Vector3(r.get_xMax(), r.get_yMin(), 0f);
     ClipRenderer.s_Vertices[2] = new Vector3(r.get_xMax(), r.get_yMax(), 0f);
     ClipRenderer.s_Vertices[3] = new Vector3(r.get_xMin(), r.get_yMax(), 0f);
     ClipRenderer.s_Quad.set_vertices(ClipRenderer.s_Vertices);
     ClipRenderer.s_UVs[0] = new Vector2(0f, 1f);
     ClipRenderer.s_UVs[1] = new Vector2(1f, 1f);
     ClipRenderer.s_UVs[2] = new Vector2(1f, 0f);
     ClipRenderer.s_UVs[3] = new Vector2(0f, 0f);
     ClipRenderer.s_Quad.set_uv(ClipRenderer.s_UVs);
     ClipRenderer.s_ClipMaterial.SetTexture("_MainTex", style.get_normal().get_background());
     ClipRenderer.s_ClipMaterial.SetColor("_Color", color);
     ClipRenderer.s_ClipMaterial.SetPass(0);
     Graphics.DrawMeshNow(ClipRenderer.s_Quad, Handles.get_matrix());
 }