using System; namespace BizHawk.Bizware.BizwareGL { public interface IGuiRenderer : IDisposable { /// /// Begins rendering /// void Begin(); void Begin(System.Drawing.Size size); /// /// begin rendering, initializing viewport and projections to the given dimensions /// void Begin(int width, int height); /// /// draws the specified Art resource /// void Draw(Art art); /// /// draws the specified Art resource with the specified offset. This could be tricky if youve applied other rotate or scale transforms first. /// void Draw(Art art, OpenTK.Vector2 pos); /// /// draws the specified Art resource with the specified offset. This could be tricky if youve applied other rotate or scale transforms first. /// void Draw(Art art, float x, float y); /// /// draws the specified Art resource with the specified offset, with the specified size. This could be tricky if youve applied other rotate or scale transforms first. /// void Draw(Art art, float x, float y, float width, float height); /// /// draws the specified Texture with the specified offset, with the specified size. This could be tricky if youve applied other rotate or scale transforms first. /// void Draw(Texture2d art, float x, float y, float width, float height); /// /// draws the specified texture2d resource. /// void Draw(Texture2d tex); /// /// draws the specified texture2d resource. /// void Draw(Texture2d tex, float x, float y); /// /// draws the specified Art resource with the given flip flags /// void DrawFlipped(Art art, bool xflip, bool yflip); /// /// Draws a subrectangle from the provided texture. For advanced users only /// void DrawSubrect(Texture2d tex, float x, float y, float w, float h, float u0, float v0, float u1, float v1); /// /// Ends rendering /// void End(); /// /// Use this, if you must do something sneaky to openGL without this GuiRenderer knowing. /// It might be faster than End and Beginning again, and certainly prettier /// void Flush(); bool IsActive { get; } MatrixStack Modelview { get; set; } IGL Owner { get; } MatrixStack Projection { get; set; } void RectFill(float x, float y, float w, float h); void SetBlendState(IBlendState rsBlend); /// /// Sets the specified corner color (for the gradient effect) /// void SetCornerColor(int which, OpenTK.Graphics.Color4 color); /// /// Sets all four corner colors at once /// void SetCornerColors(OpenTK.Graphics.Color4[] colors); /// /// Restores the pipeline to the default /// void SetDefaultPipeline(); void SetModulateColor(System.Drawing.Color color); void SetModulateColorWhite(); /// /// Sets the pipeline for this GuiRenderer to use. We won't keep possession of it. /// This pipeline must work in certain ways, which can be discerned by inspecting the built-in one /// void SetPipeline(Pipeline pipeline); } }