Skip to contents

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).

Value

A texture

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;