DrawContext

data class DrawContext(val model: Matrix44, val view: Matrix44, val projection: Matrix44, val width: Int, val height: Int, val contentScale: Double, val modelViewScalingFactor: Double)(source)

Represents the drawing context containing transformation matrices and additional parameters necessary to configure a rendering shader.

Constructors

Link copied to clipboard
constructor(model: Matrix44, view: Matrix44, projection: Matrix44, width: Int, height: Int, contentScale: Double, modelViewScalingFactor: Double)

Properties

Link copied to clipboard

The scale factor used to adjust content rendering based on display scaling or resolution.

Link copied to clipboard
val height: Int

The height of the viewport or rendering surface.

Link copied to clipboard

The model matrix representing the transformations applied to the object in the world space.

Link copied to clipboard

A scaling factor combining model and view transformations for additional adjustments.

Link copied to clipboard

The projection matrix defining the perspective or orthographic projection of the view.

Link copied to clipboard

The view matrix representing the camera or viewing transformations.

Link copied to clipboard
val width: Int

The width of the viewport or rendering surface.

Functions

Link copied to clipboard
fun applyToShader(shader: Shader)

Applies the current transformation and rendering context to the specified shader.