Orklev2 dwi

From tweakoz/orkid · View interactive version

Orklev2 dwi is an AI agent skill from the GitHub repository tweakoz/orkid. Answer questions about orkid's DrawingInterface (DWI), 2D/3D quad rendering, line drawing, fullscreen quads, tiled quads, screen-space rendering helpers, and Python DWI bindings. Use when the user asks about 2D drawing, quad rendering, or screen-space primitives.

How to use this skill

Skill file

Orkid DrawingInterface (DWI) Reference

When answering questions about 2D drawing, screen-space quads, or line rendering in orkid, consult the files below. All under ork.lev2/.

Key Files

| Component | File |

|-----------|------|

| DWI Interface | inc/ork/lev2/gfx/dwi.h (lines 9–56) |

| Vulkan DWI | src/gfx/vulkan/headers/vulkan_ctx.h (lines 139–142) |

| Python Bindings | pyext/src/pyext_gfx.cpp (lines 298–322) |

DWI Interface (dwi.h:9–56)

The DrawingInterface provides methods for rendering 2D/3D quads and lines, primarily used for post-processing, UI overlays, and debug visualization.

Line Drawing

2D Quad Drawing (Screen-Space)

| Method | Description |

|--------|-------------|

| quad2DEML(quadrect, uvA, uvB, depth) | Basic screen quad with dual UV sets |

| quad2DEML2(quadrect, uvA, uvB, depth) | Variant 2 |

| quad2DEMLCCL(quadrect, uvA, uvB, depth) | CCL winding variant |

| quad2D(quadrect, uvA, uvB, depth) | Auto-winding (uses RenderingConventions) |

| fullscreenQuad(uvA, uvB, depth) | Fills entire viewport |

Parameters:

3D Quad Drawing

Advanced 2D Quad (Per-Vertex UVs)

Tiled Quad Drawing

Notes

Typical Usage

// Post-processing fullscreen pass
auto* DWI = ctx->DWI();
auto* FXI = ctx->FXI();

FXI->BeginBlock(technique, rcid);
DWI->fullscreenQuad();  // Renders a screen-filling quad
FXI->EndBlock();

// Debug overlay quad
DWI->quad2D(
    fvec4(10, 10, 200, 200),     // screen rect
    fvec4(0, 0, 1, 1),           // UV channel A
    fvec4(0, 0, 1, 1),           // UV channel B
    0.0f                          // depth
);

Python API

dwi = ctx.DWI

# Fullscreen quad (most common for post-processing)
dwi.fullscreenQuad()
dwi.fullscreenQuad(fvec4(0,0,1,1), fvec4(0,0,1,1), 0.0)

# Screen-space quad
dwi.quad2D(fvec4(x, y, w, h))
dwi.quad2D(fvec4(x, y, w, h), fvec4(u0,v0,u1,v1), fvec4(u0,v0,u1,v1), depth)

How to Answer

  1. For DWI methods: check dwi.h:9–56
  2. For winding conventions: check RenderingConventions in gfxenv.h:166–182
  3. For vertex format used: SVtxV12C4T16 in gfxvtxbuf_structs.h
  4. For Python: check pyext_gfx.cpp:298–322
Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.