Cub3D
 
Loading...
Searching...
No Matches
Backbuffer Manipulation

Backbuffer functions used to manipulate and place pixels onto it. More...

Functions

void cubmlx_clear (t_mlx *mlx, unsigned int color)
 Clear the backbuffer with a specific color.
 
void cubmlx_putpixel (t_data *data, int x, int y, unsigned int color)
 Puts a pixel onto the backbuffer.
 
void cubmlx_putvertline (t_data *data, t_pos2 pos, int len, unsigned int color)
 Puts a vertical line on the backbuffer. Optimized for vertical lines.
 
void cubmlx_putrect (t_data *data, t_pos2 pos, t_pos2 size, unsigned int color)
 Puts a rectangle onto the backbuffer.
 
void cubmlx_putline (t_data *data, t_pos2 p1, t_pos2 p2, unsigned int color)
 Puts a line onto the backbuffer.
 

Detailed Description

Backbuffer functions used to manipulate and place pixels onto it.

Function Documentation

◆ cubmlx_clear()

void cubmlx_clear ( t_mlx * mlx,
unsigned int color )

Clear the backbuffer with a specific color.

Parameters
[in,out]mlxmlx structure
[in]colorcolor

◆ cubmlx_putline()

void cubmlx_putline ( t_data * data,
t_pos2 p1,
t_pos2 p2,
unsigned int color )

Puts a line onto the backbuffer.

Parameters
[in,out]datadata structure
[in]p1coordinates of starting point of the line
[in]p2coordinates of ending point of the line
[in]colorcolor
Here is the call graph for this function:

◆ cubmlx_putpixel()

void cubmlx_putpixel ( t_data * data,
int x,
int y,
unsigned int color )

Puts a pixel onto the backbuffer.

Parameters
[in,out]datadata structure
[in]xx axis
[in]yy axis
[in]colorcolor

◆ cubmlx_putrect()

void cubmlx_putrect ( t_data * data,
t_pos2 pos,
t_pos2 size,
unsigned int color )

Puts a rectangle onto the backbuffer.

Parameters
[in,out]datastructure
[in]posstarting point
[in]sizerectangle width and height
[in]colorcolor
Here is the call graph for this function:

◆ cubmlx_putvertline()

void cubmlx_putvertline ( t_data * data,
t_pos2 pos,
int len,
unsigned int color )

Puts a vertical line on the backbuffer. Optimized for vertical lines.

Parameters
[in,out]datadata structure
[in]poscoordinates of starting point of the line
[in]lenlen of the line
[in]colorcolor