Raftel Engine
 
Loading...
Searching...
No Matches
Raftel::TextureImage Class Reference

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

Detailed Description

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.

Constructor & Destructor Documentation

◆ TextureImage()

Raftel::TextureImage::TextureImage ( unsigned char * data,
int width,
int height,
int n_channel )

Construct a TextureImage object.

Parameters
dataThe raw image data.
widthThe width of the image.
heightThe height of the image.
n_channelThe number of channels in the image (e.g., 3 for RGB, 4 for RGBA).

Member Data Documentation

◆ data

unsigned char* Raftel::TextureImage::data

Pointer to the raw image data.

Definition at line 41 of file texture.hpp.

◆ height

int Raftel::TextureImage::height

Height of the image.

Definition at line 43 of file texture.hpp.

◆ n_channel

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.

◆ width

int Raftel::TextureImage::width

Width of the image.

Definition at line 42 of file texture.hpp.


The documentation for this class was generated from the following file: