![]() |
libdragon
|
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. | |
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.
tile | Hint of the tile to use. Note that this function is free to use other tiles to perform its job. |
tex | Surface to draw |
s0 | Starting X coordinate in the texture to draw |
t0 | Starting Y coordinate in the texture to draw |
s1 | Ending X coordinate in the texture to draw |
t1 | Ending Y coordinate in the texture to draw |
draw_cb | Callback 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. |
filtering | Enable texture filtering workaround |