Functions

void hal_gfx_interpolate_rect_colors (int x0, int y0, int w, int h, color_var_t *col0, color_var_t *col1, color_var_t *col2)
 Interpolate color gradient for rectangle. More...
 
void hal_gfx_interpolate_tri_colors (float x0, float y0, float x1, float y1, float x2, float y2, color_var_t *col0, color_var_t *col1, color_var_t *col2)
 Interpolate color gradient for triangle. More...
 
void hal_gfx_interpolate_tri_depth (float x0, float y0, float z0, float x1, float y1, float z1, float x2, float y2, float z2)
 Interpolate depth buffer values for triangle. More...
 
void hal_gfx_interpolate_tx_ty (float x0, float y0, float w0, float tx0, float ty0, float x1, float y1, float w1, float tx1, float ty1, float x2, float y2, float w2, float tx2, float ty2, int tex_width, int tex_height)
 Interpolate texture values for triangle. More...
 

Detailed Description

Function Documentation

◆ hal_gfx_interpolate_rect_colors()

void hal_gfx_interpolate_rect_colors ( int  x0,
int  y0,
int  w,
int  h,
color_var_t col0,
color_var_t col1,
color_var_t col2 
)

Interpolate color gradient for rectangle.

Parameters
[in]x0x coordinate of the upper left vertex of the rectangle
[in]y0y coordinate at the upper left vertex of the rectangle
[in]wwidth of the rectangle
[in]hheight of the rectangle
[in]col0color for the first vertex
[in]col1color for the second vertex
[in]col2color for the third vertex

◆ hal_gfx_interpolate_tri_colors()

void hal_gfx_interpolate_tri_colors ( float  x0,
float  y0,
float  x1,
float  y1,
float  x2,
float  y2,
color_var_t col0,
color_var_t col1,
color_var_t col2 
)

Interpolate color gradient for triangle.

Parameters
[in]x0x coordinate at the first vertex of the triangle
[in]y0y coordinate at the first vertex of the triangle
[in]x1x coordinate at the second vertex of the triangle
[in]y1y coordinate at the second vertex of the triangle
[in]x2x coordinate at the third vertex of the triangle
[in]y2y coordinate at the third vertex of the triangle
[in]col0color for the first vertex
[in]col1color for the second vertex
[in]col2color for the third vertex

◆ hal_gfx_interpolate_tri_depth()

void hal_gfx_interpolate_tri_depth ( float  x0,
float  y0,
float  z0,
float  x1,
float  y1,
float  z1,
float  x2,
float  y2,
float  z2 
)

Interpolate depth buffer values for triangle.

Parameters
[in]x0coordinate at the first vertex of the triangle
[in]y0coordinate at the first vertex of the triangle
[in]z0coordinate at the first vertex of the triangle
[in]x1coordinate at the second vertex of the triangle
[in]y1coordinate at the second vertex of the triangle
[in]z1coordinate at the second vertex of the triangle
[in]x2coordinate at the third vertex of the triangle
[in]y2coordinate at the third vertex of the triangle
[in]z2coordinate at the third vertex of the triangle

◆ hal_gfx_interpolate_tx_ty()

void hal_gfx_interpolate_tx_ty ( float  x0,
float  y0,
float  w0,
float  tx0,
float  ty0,
float  x1,
float  y1,
float  w1,
float  tx1,
float  ty1,
float  x2,
float  y2,
float  w2,
float  tx2,
float  ty2,
int  tex_width,
int  tex_height 
)

Interpolate texture values for triangle.

Parameters
[in]x0x coordinate at the first vertex of the triangle
[in]y0y coordinate at the first vertex of the triangle
[in]w0w coordinate at the first vertex of the triangle
[in]tx0x texture coordinate at the first vertex of the triangle
[in]ty0y texture coordinate at the first vertex of the triangle
[in]x1x coordinate at the second vertex of the triangle
[in]y1y coordinate at the second vertex of the triangle
[in]w1w coordinate at the second vertex of the triangle
[in]tx1x texture coordinate at the second vertex of the triangle
[in]ty1y texture coordinate at the second vertex of the triangle
[in]x2x coordinate at the third vertex of the triangle
[in]y2y coordinate at the third vertex of the triangle
[in]w2w coordinate at the third vertex of the triangle
[in]tx2x texture coordinate at the third vertex of the triangle
[in]ty2x texture coordinate at the third vertex of the triangle
[in]tex_widthtexture width
[in]tex_heighttexture height