Render-target texture wrapper with cached access to 1D, 2D, and 3D graphics contexts.
Texture is a lightweight abstraction over kha.Image for render targets.
It is commonly used as an intermediate buffer, post-processing target, or
off-screen drawing surface.
Typical usage:
var target = new Texture(512, 512);
target.context2D.begin();
// draw into the texture
target.context2D.end();Static variables
staticread onlycontext1D:Context1D
1D graphics context for this texture.
Use this when you need low-level access to the 1D drawing API exposed by Kha.
Static methods
staticinlinesetDepthStencilFrom(this:Image, image:Image):Void
Reuses the depth/stencil buffer from another image.
This is useful when multiple render targets should share depth/stencil data within the same rendering pipeline.
Parameters:
image | Source image providing the depth/stencil attachment. |
|---|