🖼️Managed

This type represents a managed object. You cannot create an instance of this type directly.

Every object, that inherits from this type, must be created before use. The rendering system will only create them automatically, if you happen to lose a device object (e.g. minimize the game window, and then restore it) and only if you add your objects to manage table in draw.

obj

Type: ptr

Pointer to a GPU object. If this object is not created, this field will be nil. You can use the value of this field to pass it to command directly for example, or if you (for whatever reason we don't recommend you doing) want to have a direct control over the pointer - cast it to FFI's cdata.


create

Creates a managed object in GPU memory.

Arguments

None.

Returns

Nothing.

Example

tex:create();

destroy

Destroys a managed object in GPU memory.

Arguments

None.

Returns

Nothing.

Example

font:destroy();

Last updated