use al_reset_clipping_rectangle for clarity

This commit is contained in:
Sebastian Krzyszkowiak 2018-06-03 03:39:28 +02:00
parent 897aa8b52f
commit 291e4c73d6
2 changed files with 2 additions and 2 deletions

View file

@ -437,7 +437,7 @@ SYMBOL_INTERNAL void RemoveTimeline(struct Game* game, struct Timeline* timeline
SYMBOL_INTERNAL void ClearScreen(struct Game* game) {
al_set_target_backbuffer(game->display);
al_set_clipping_rectangle(0, 0, al_get_display_width(game->display), al_get_display_height(game->display));
al_reset_clipping_rectangle();
al_clear_to_color(al_map_rgb(0, 0, 0));
al_clear_depth_buffer(1.0);
al_set_clipping_rectangle(game->_priv.clip_rect.x, game->_priv.clip_rect.y, game->_priv.clip_rect.w, game->_priv.clip_rect.h);

View file

@ -468,7 +468,7 @@ SYMBOL_EXPORT void SetupViewport(struct Game* game, struct Viewport config) {
al_set_target_backbuffer(game->display);
al_identity_transform(&game->projection);
al_use_transform(&game->projection);
al_set_clipping_rectangle(0, 0, al_get_display_width(game->display), al_get_display_height(game->display));
al_reset_clipping_rectangle();
float resolution = al_get_display_height(game->display) / (float)game->viewport.height;
if (al_get_display_width(game->display) / (float)game->viewport.width < resolution) {