LoggingBackend

class LoggingBackend(val inner: Backend, val log: Log) : Backend

Logs calls to the Backend, and the forwards the calls to an inner.

Constructors

Link copied to clipboard
constructor(inner: Backend, log: Log)

Properties

Link copied to clipboard
Link copied to clipboard
val log: Log

Functions

Link copied to clipboard
open override fun batch(texture: Texture, tint: Color?, modelMatrix: Matrix?, block: TextureBatch.() -> Unit)

OpenGL is moe efficient when operations can be batched. So rather than call drawTexture multiple times (with the same texture, tint, and modelMatrix), batch them and call TextureBatch.draw instead.

Link copied to clipboard
open override fun beginClipping(left: Float, top: Float, width: Float, height: Float): Boolean

Clip (scissor). The values are LogicalPixels measured from the TOP left of the window. The clipped region is the intersection of the currently clipped region and the newly requested region.

Link copied to clipboard
open override fun clear(color: Color)

Draws a flot color over the entire viewport. Used at the start of each redraw.

Link copied to clipboard
open override fun createTexture(name: String, width: Int, height: Int, pixels: IntArray): Texture
Link copied to clipboard
open override fun createWindow(width: Int, height: Int): Window
Link copied to clipboard
open override fun drawFrame(window: Window, block: () -> Unit)
Link copied to clipboard
open override fun drawTexture(texture: Texture, srcX: Float, srcY: Float, width: Float, height: Float, destX: Float, destY: Float, destWidth: Float, destHeight: Float, modelMatrix: Matrix?)

Draws the part of the texture defined by the rectangle srcX, srcY, height to destX, destY (which is where the top-left of the source corresponds to).

Link copied to clipboard
open override fun drawTintedTexture(texture: Texture, tint: Color, srcX: Float, srcY: Float, width: Float, height: Float, destX: Float, destY: Float, destWidth: Float, destHeight: Float, modelMatrix: Matrix?)
Link copied to clipboard
open override fun drawView(width: Float, height: Float, scale: Float, block: () -> Unit)
Link copied to clipboard
open override fun endClipping()
Link copied to clipboard
open override fun fillQuarterCircle(x1: Float, y1: Float, x2: Float, y2: Float, color: Color, radius: Float)
Link copied to clipboard
open override fun fillRect(rect: GlokRect, color: Color)
open override fun fillRect(left: Float, top: Float, right: Float, bottom: Float, color: Color)
Link copied to clipboard
open override fun gradient(triangles: FloatArray, colors: Array<Color>)

A gradient fill. Each vertex of each triangle has a color.

Link copied to clipboard
open override fun hsvGradient(triangles: FloatArray, colors: Array<FloatArray>)
Link copied to clipboard
open override fun monitorSize(): Pair<Int, Int>?
Link copied to clipboard
open override fun processEvents(timeoutSeconds: Double)
Link copied to clipboard
open override fun resources(path: String): Resources
Link copied to clipboard
open override fun setCursor(window: Window, cursor: StandardCursor)
Link copied to clipboard
open override fun strokeInsideRect(rect: GlokRect, thickness: Float, color: Color)
open override fun strokeInsideRect(left: Float, top: Float, right: Float, bottom: Float, thickness: Float, color: Color)
Link copied to clipboard
open override fun strokeQuarterCircle(x1: Float, y1: Float, x2: Float, y2: Float, color: Color, radius: Float, innerRadius: Float)
Link copied to clipboard
open override fun transform(transformation: Matrix, block: () -> Unit)

Transforms the coordinates of all drawing calls within the block of code. Used by the Rotation node and ProxyNode.