Generates the OpenGL texture and initializes the struct.
Alias this to texture.
Sets the texture data.
Loads an image and afterwards loads it into a Texture2D struct. Image can be loaded by stb and SDLImage. To select specific way use versions stb, SDLImage2 (SDL2) or SDLImage (SDL1).
Holds the format of the pixel data.
Holds the texture height.
Holds the internal format passed to the constructor.
If true (default) mipmaps will be generated with glGenerateMipmap.
The OpenGL texture name.
Holds the OpenGL data type of the pixel data.
Holds the texture unit.
Holds the texture width.
Deletes the texture.
Sets a texture parameter.
Queries a texture parameter from OpenGL.
Generates mipmaps for the textre (also binds it)
Binds the texture.
Activates the texture to unit, passed to the function.
Activates the texture to unit, the struct member.
Binds the texture and activates it to unit, passed to the function.
Binds the texture and activates it to unit, the struct member.
Unbinds the texture.
Represents an OpenGL 2D texture. The constructor must be used to avoid segmentation faults.