Texture - THE-FYP/MoonAdditions GitHub Wiki
Functions
load_bmp_texture_with_mask
Texture texture = load_bmp_texture_with_mask(string image_path, string mask_path)
Loads texture from BMP image file with alpha mask and returns texture
object.
Returns nil
on failure.
load_png_texture
Texture texture = load_png_texture(string image_path)
Loads texture from PNG image file and returns texture
object.
load_dds_texture
Texture texture = load_dds_texture(string image_path)
Loads texture from DDS image file and returns texture
object.
Class texture
Static Members
texture.from_memory
Texture texture = texture.from_memory(uint rwtexture_ptr)
Members
texture:get_pointer
uint ptr = texture:get_pointer()
texture:draw
texture:draw(float left, float top, float right, float bottom, [int r, int g, int b, int a, float angle])
texture:draw_with_gradient
texture:draw_with_gradient(float left, float top, float right, float bottom, [int r1, int g1, int b1, int a1, int r2, int g2, int b2, int a2, int r3, int g3, int b3, int a3, int r4, int g4, int b4, int a4, float angle])
texture.width
int width = texture.width
texture.height
int height = texture.height
texture.name
string name = texture.name
Returns nil
on failure.
texture.valid
bool valid = texture.valid