libdragon
Loading...
Searching...
No Matches
Typedefs | Functions
rdpq_tex_internal.h File Reference

Go to the source code of this file.

Typedefs

typedef void(* large_tex_draw) (rdpq_tile_t tile, const surface_t *tex, int s0, int t0, int s1, int t1, void(*draw_cb) (rdpq_tile_t tile, int s0, int t0, int s1, int t1), bool filtering)
 Helper function to draw a large surface that doesn't fit in TMEM.
 

Functions

void __rdpq_tex_blit (const surface_t *surf, float x0, float y0, const rdpq_blitparms_t *parms, large_tex_draw ltd)
 Internal implementation of rdpq_tex_blit, using a custom large tex loader callback function.
 

Detailed Description

Author
Dennis Heinze denni.nosp@m.sjp..nosp@m.heinz.nosp@m.e@gm.nosp@m.ail.c.nosp@m.om

Typedef Documentation

◆ large_tex_draw

typedef void(* large_tex_draw) (rdpq_tile_t tile, const surface_t *tex, int s0, int t0, int s1, int t1, void(*draw_cb)(rdpq_tile_t tile, int s0, int t0, int s1, int t1), bool filtering)

Helper function to draw a large surface that doesn't fit in TMEM.

This function analyzes the surface, finds the optimal splitting strategy to divided into rectangles that fit TMEM, and then go through them one of by one, loading them into TMEM and drawing them.

The actual drawing is done by the caller, through the draw_cb function. This function will just call it with the information on the current rectangle within the original surface.

Parameters
tileHint of the tile to use. Note that this function is free to use other tiles to perform its job.
texSurface to draw
s0Starting X coordinate in the texture to draw
t0Starting Y coordinate in the texture to draw
s1Ending X coordinate in the texture to draw
t1Ending Y coordinate in the texture to draw
draw_cbCallback function to draw rectangle by rectangle. It will be called with the tile to use for drawing, and the rectangle of the original surface that has been loaded into TMEM.
filteringEnable texture filtering workaround