From 3ab4c90b24a3389c8b7747742f1e3289be3453d2 Mon Sep 17 00:00:00 2001 From: Thomas Perl Date: Thu, 12 Nov 2015 09:43:12 +0100 Subject: [PATCH] GRRLIB_ttf.c: DrawBitmap: Use less GX_Begin/GX_End calls --- GRRLIB/GRRLIB/GRRLIB_ttf.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/GRRLIB/GRRLIB/GRRLIB_ttf.c b/GRRLIB/GRRLIB/GRRLIB_ttf.c index fbbcf58..17c0a19 100644 --- a/GRRLIB/GRRLIB/GRRLIB_ttf.c +++ b/GRRLIB/GRRLIB/GRRLIB_ttf.c @@ -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(); } /**