mirror of
https://gitlab.com/dosowisko.net/libsuperderpy.git
synced 2025-03-04 09:11:27 +01:00
DrawConsole: use deferred bitmap drawing to speed up text rendering
This commit is contained in:
parent
fc37ec592e
commit
1ac8491396
1 changed files with 2 additions and 0 deletions
|
@ -112,6 +112,7 @@ SYMBOL_INTERNAL void DrawConsole(struct Game* game) {
|
|||
int clipX, clipY, clipWidth, clipHeight;
|
||||
al_get_clipping_rectangle(&clipX, &clipY, &clipWidth, &clipHeight);
|
||||
al_use_transform(&trans);
|
||||
al_hold_bitmap_drawing(true);
|
||||
|
||||
int width = (al_get_display_width(game->display) / game->viewport.width) * game->viewport.width;
|
||||
if (!game->viewport.integer_scaling) {
|
||||
|
@ -139,6 +140,7 @@ SYMBOL_INTERNAL void DrawConsole(struct Game* game) {
|
|||
|
||||
DrawTimelines(game);
|
||||
}
|
||||
al_hold_bitmap_drawing(false);
|
||||
|
||||
double game_time = al_get_time();
|
||||
if (game_time - game->_priv.fps_count.old_time >= 1.0) {
|
||||
|
|
Loading…
Add table
Reference in a new issue