mirror of
https://github.com/GRRLIB/GRRLIB.git
synced 2024-11-25 08:12:20 +00:00
GRRLIB_ttf.c: DrawBitmap: Use less GX_Begin/GX_End calls
This commit is contained in:
parent
18a7f280e5
commit
3ab4c90b24
1 changed files with 5 additions and 5 deletions
|
@ -175,15 +175,15 @@ static void DrawBitmap(FT_Bitmap *bitmap, int offset, int top, const u8 cR, cons
|
|||
FT_Int x_max = offset + bitmap->width;
|
||||
FT_Int y_max = top + bitmap->rows;
|
||||
|
||||
GX_Begin(GX_POINTS, GX_VTXFMT0, (x_max - offset) * (y_max - top));
|
||||
for ( i = offset, p = 0; i < x_max; i++, p++ ) {
|
||||
for ( j = top, q = 0; j < y_max; j++, q++ ) {
|
||||
GX_Begin(GX_POINTS, GX_VTXFMT0, 1);
|
||||
GX_Position3f32(i, j, 0);
|
||||
GX_Color4u8(cR, cG, cB,
|
||||
bitmap->buffer[ q * bitmap->width + p ]);
|
||||
GX_End();
|
||||
GX_Position3f32(i, j, 0);
|
||||
GX_Color4u8(cR, cG, cB,
|
||||
bitmap->buffer[ q * bitmap->width + p ]);
|
||||
}
|
||||
}
|
||||
GX_End();
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
Loading…
Reference in a new issue