Represents an image containing texture data. More...
#include <texture.hpp>
Public Member Functions | |
TextureImage (unsigned char *data, int width, int height, int n_channel) | |
Construct a TextureImage object. | |
~TextureImage () | |
Destructor that frees the image data. | |
Public Attributes | |
unsigned char * | data |
Pointer to the raw image data. | |
int | width |
Width of the image. | |
int | height |
Height of the image. | |
int | n_channel |
Number of channels in the image (e.g., 3 for RGB, 4 for RGBA). | |
Represents an image containing texture data.
The TextureImage
class is used to store the raw image data, including width, height, and the number of channels. This class is typically used as an intermediate data structure before creating an OpenGL texture.
Definition at line 39 of file texture.hpp.
Raftel::TextureImage::TextureImage | ( | unsigned char * | data, |
int | width, | ||
int | height, | ||
int | n_channel ) |
Construct a TextureImage
object.
data | The raw image data. |
width | The width of the image. |
height | The height of the image. |
n_channel | The number of channels in the image (e.g., 3 for RGB, 4 for RGBA). |
unsigned char* Raftel::TextureImage::data |
Pointer to the raw image data.
Definition at line 41 of file texture.hpp.
int Raftel::TextureImage::height |
Height of the image.
Definition at line 43 of file texture.hpp.
int Raftel::TextureImage::n_channel |
Number of channels in the image (e.g., 3 for RGB, 4 for RGBA).
Definition at line 44 of file texture.hpp.
int Raftel::TextureImage::width |
Width of the image.
Definition at line 42 of file texture.hpp.