al_get_backbuffer(3)

πŸ“¦
version 5.2.11.3 Β· 3 versions
, in arch rolling

πŸ’– NAME πŸ’–

hii bestie, welcome to the al_get_backbuffer(3) page β€” this is the Library Functions Manual entry for the Allegro 5 API. The function is al_get_backbuffer, and it is literally about getting the display’s back-buffer bitmap 🫢

🌸 SYNOPSIS 🌸

#include <allegro5/allegro.h>

ALLEGRO_BITMAP *al_get_backbuffer(ALLEGRO_DISPLAY *display)

πŸ¦‹ DESCRIPTION πŸ¦‹

So this function returns a special bitmap that represents the back-buffer of the display ✨ It’s giving β€œmain character bitmap”, but it’s special, okay? πŸ‘‘

Care should be taken when using the backbuffer bitmap (and its sub-bitmaps) as the source bitmap (e.g as the bitmap argument to al_draw_bitmap(3)) πŸ™ˆ This is the part where you gotta pay attention, bestie.

Only untransformed operations are hardware accelerated. These consist of al_draw_bitmap(3) and al_draw_bitmap_region(3) when the current transformation is the identity πŸ’… If the transformation is not the identity, or some other drawing operation is used, the call will be routed through the memory bitmap routines, which are slow 😭 No cap.

If you need those operations to be accelerated, then first copy a region of the backbuffer into a temporary bitmap (via the al_draw_bitmap(3) and al_draw_bitmap_region(3)), and then use that temporary bitmap as the source bitmap πŸŽ€ That’s the move. Periodt.


That’s the whole page, bestie: it’s from the Allegro reference manual, and the page is al_get_backbuffer(3) β€” no date printed on this one, just the manual source and title doing their little sign-off πŸ’–πŸ¦‹

πŸ“¦ where this page comes from
  • arch rolling: allegro 5.2.11.3-2 Β· Zlib AND BSD-3-Clause AND OFL-1.1 AND LicenseRef-Custom
  • πŸ’– girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms