Create a new texture object.
Usage
texture(id, width, height, mipmaps, format)
Arguments
- id
A non-negative integer. OpenGL texture id.
- width
An integer. Texture base width.
- height
An integer. Texture base height.
- mipmaps
An integer. Mipmap levels, 1 by default.
- format
An integer. Data format (PixelFormat type).
Note
This class has been auto-generated from the following Raylib struct definition:
typedef struct Texture {
unsigned int id; // OpenGL texture id
int width; // Texture base width
int height; // Texture base height
int mipmaps; // Mipmap levels, 1 by default
int format; // Data format (PixelFormat type)
} Texture;
See also
Other texture functions:
begin_texture_mode(),
draw_texture(),
draw_texture_ex(),
draw_texture_n_patch(),
draw_texture_pro(),
draw_texture_rec(),
draw_texture_v(),
end_texture_mode(),
get_shapes_texture(),
is_texture_valid(),
load_image_from_texture(),
load_render_texture(),
load_texture(),
load_texture_from_image(),
set_shader_value_texture(),
set_shapes_texture(),
set_texture_filter(),
set_texture_wrap(),
unload_render_texture(),
unload_texture()
Examples
tex <- texture(0L, 800L, 450L, 0L, 0L)
tex$id
#> [1] 0
tex$width
#> [1] 800