texture
Last updated
Last updated
This type represents a texture object.
Constructs an instance of this type.
Passing an invalid pointer, a or memory region that is smaller than the size will result in a crash.
Arguments
1. From file.
Name
Type
Description
path
string
Path to a valid texture file.
2. From memory.
Name
Type
Description
data
Pointer to texture file data in memory.
sz
int
Size of the texture file data.
3. From RGBA data.
Name
Type
Description
data
Pointer to RGBA data in memory.
w
int
Width.
h
int
Height (row count).
p
int
Pitch (row width). This is the amount of bytes per row.
Returns
Type
Description
texture
Texture object.
Example
Type: bool
Returns size of this texture.
Arguments
None.
Returns
Type
Description
Texture dimensions.
Example
Set to true
if this is an instance of .