|
| virtual | ~IGraphics2D ()=default |
| |
| virtual void | clearScreen ()=0 |
| | Clears the current draw target to the background color.
|
| |
| virtual void | setBackgroundColorRGBA (float r, float g, float b, float a=1.f)=0 |
| |
| virtual void | drawSolidRectRGBA (float x, float y, float w, float h, float r, float g, float b, float a=1.f)=0 |
| |
| virtual void | drawTexturedRectRGBA (Texture *texture, float x, float y, float w, float h, float r, float g, float b, float a=1.f)=0 |
| |
| virtual void | drawSolidRect (float x, float y, float w, float h, const Color &color, BlendMode blend=BlendMode::Alpha)=0 |
| |
| virtual void | drawSolidRectRotated (float cx, float cy, float w, float h, float degrees, const Color &color, BlendMode blend=BlendMode::Alpha)=0 |
| |
| virtual void | drawTexturedRect (Texture *texture, float x, float y, float w, float h, const Color &color)=0 |
| |
| virtual void | drawTexturedRectShader (Texture *texture, Shader *shader, float x, float y, float w, float h, const Color &color)=0 |
| |
| virtual void | drawTexturedRectUV (Texture *texture, float x, float y, float w, float h, float u0, float v0, float u1, float v1, const Color &color)=0 |
| |
| virtual void | drawTexturedRectShaderUV (Texture *texture, Shader *shader, float x, float y, float w, float h, float u0, float v0, float u1, float v1, const Color &color, bool rotatedUV=false, BlendMode blend=BlendMode::Alpha)=0 |
| |
| virtual void | drawTexturedRectShaderUVRotated (Texture *texture, Shader *shader, float cx, float cy, float w, float h, float degrees, float u0, float v0, float u1, float v1, const Color &color, bool rotatedUV=false, BlendMode blend=BlendMode::Alpha)=0 |
| |
| virtual void | drawTexturedRectShaderDepth (Texture *color, Texture *depth, Shader *shader, float x, float y, float w, float h, const Color &tint)=0 |
| |
| virtual void | drawTexturedRectLitUV (Texture *albedo, Texture *normal, float x, float y, float w, float h, float u0, float v0, float u1, float v1, const Color &color)=0 |
| | Lit 2D draw (albedo + normal map); normal may be null → flat.
|
| |
| virtual void | setLighting2D (const Lighting2DUBO &ubo)=0 |
| | Upload per-frame / per-canvas 2D lighting constants.
|
| |
| virtual void | setCanvas (Canvas *canvas)=0 |
| | Draw target; nullptr → screen.
|
| |
| virtual bool | isCanvasActive () const =0 |
| |
| virtual Canvas * | getCanvas () const =0 |
| |
| virtual void | setShader (Shader *shader)=0 |
| | Custom fragment pipeline for subsequent textured 2D draws.
|
| |
| virtual void | setShader ()=0 |
| |
| virtual Shader * | getShader () const =0 |
| |
| virtual void | setFont (Font *font)=0 |
| | Font used by print(); nullptr = none set.
|
| |
| virtual Font * | getFont () const =0 |
| |
| virtual void | print (const std::string &text, float x, float y, const Color &color=Color(1.f, 1.f, 1.f, 1.f), float scale=1.f)=0 |
| | Draws UTF-8 text with the current font (throws when unset).
|
| |
| virtual void | draw (Drawable *drawable, const glm::mat4 &m)=0 |
| |
| virtual void | drawOcclusion (Drawable *drawable, const glm::mat4 &m)=0 |
| |
| virtual void | drawOcclusionSolid (float x, float y, float w, float h)=0 |
| |
| virtual void | drawOcclusionTexture (Texture *texture, float x, float y, float w, float h)=0 |
| |
| virtual void | pushValidationScope ()=0 |
| | Backend GPU validation scopes (WebGPU).
|
| |
| virtual void | popValidationScope ()=0 |
| |
2D immediate-mode drawing surface (screen or offscreen Canvas).
在文件 IGraphics2D.h 第 32 行定义.