Texture2D

class Texture2D(val id: {raylib/Sampler2D=} ERROR CLASS: Symbol not found for UInt, val width: Int, val height: Int, val mipmaps: Int = 1, val format: PictureFormat = PictureFormat.UNCOMPRESSED_R32G32B32A32)

Represents a two-dimensional texture in raylib.

Constructors

Link copied to clipboard
constructor(id: {raylib/Sampler2D=} ERROR CLASS: Symbol not found for UInt, width: Int, height: Int, mipmaps: Int = 1, format: PictureFormat = PictureFormat.UNCOMPRESSED_R32G32B32A32)
constructor(raw: ERROR CLASS: Symbol not found for CValue<ERROR CLASS: Symbol not found for raylib.internal.Texture2D>)

Creates a Texture2D instance from a raw raylib Texture2D C struct.

constructor(raw: ERROR CLASS: Symbol not found for raylib.internal.Texture2D)

Creates a Texture2D instance from a raw raylib Texture2D struct.

Types

Link copied to clipboard
object Companion

Properties

Link copied to clipboard

The pixel format of the texture.

Link copied to clipboard
val height: Int

The height of the texture in pixels.

Link copied to clipboard
val id: {raylib/Sampler2D=} ERROR CLASS: Symbol not found for UInt

The unique identifier for the texture.

Link copied to clipboard

The number of mipmap levels (aka levels of detail) in the texture. Higher value of mipmaps = more levels of detail. Most commonly used value is 1 (no mipmaps).

Link copied to clipboard
val width: Int

The width of the texture in pixels.