Context

abstract class Context

The context of the application. This contains instances and references to the OpenGL context and utilities to assist in creating an OpenGL applicaiton.

Author

Colton Daily

Constructors

Link copied to clipboard
fun Context()

Types

Link copied to clipboard

Functions

Link copied to clipboard
abstract fun close()

Closes and destroys this context.

Link copied to clipboard
open fun onDispose(action: suspend () -> Unit): RemoveContextCallback

Creates a new dispose callback that is invoked when the context is being destroyed.

Link copied to clipboard
open fun onPostRender(action: (dt: Duration) -> Unit): RemoveContextCallback

Creates a new post-render callback that is invoked after the render method is finished.

Link copied to clipboard
open fun onRender(action: (dt: Duration) -> Unit): RemoveContextCallback

Creates a new render callback is invoked on every frame.

Link copied to clipboard
open fun onResize(action: (width: Int, height: Int) -> Unit): RemoveContextCallback

Creates a new resize callback that is invoked whenever the context is resized.

Link copied to clipboard
open fun postRunnable(action: () -> Unit): RemoveContextCallback

Creates a new postRunnable that is invoked one time after the next frame.

Properties

Link copied to clipboard
abstract val clipboard: Clipboard

Clipboard instance for reading and copying to a clipboard.

Link copied to clipboard

The configuration this context used for creation

Link copied to clipboard
open val gl: GL

The OpenGL instance to make GL calls.

Link copied to clipboard
abstract val graphics: Graphics

The graphics related properties and instances.

Link copied to clipboard
abstract val input: Input

The Input of the context.

Link copied to clipboard
abstract val logger: Logger

The main Logger of the context.

Link copied to clipboard

The Platform this context is running on.

Link copied to clipboard
abstract val resourcesVfs: VfsFile

A VfsFile used for accessing data based on the resources directory.

Link copied to clipboard
abstract val stats: AppStats

The application runtime stats.

Link copied to clipboard
abstract val storageVfs: VfsFile

A VfsFile used for storing and reading data based on the storage directory.

Link copied to clipboard
abstract val vfs: Vfs

The virtual file system access property.

Inheritors

Link copied to clipboard
Link copied to clipboard
Link copied to clipboard