al_get_backbuffer
ALLEGRO_BITMAP *al_get_backbuffer(ALLEGRO_DISPLAY *display)
Introduced in 5.0.0
Return a special bitmap representing the back-buffer of the display.
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). Only untransformed operations are hardware accelerated. This consists of al_draw_bitmap and al_draw_bitmap_region when the current transformation is the identity. If the tranformation is not the identity, or some other drawing operation is used, the call will be routed through the memory bitmap routines, which are slow. 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 and al_draw_bitmap_region), and then use that temporary bitmap as the source bitmap.
Examples: ex_blend_test, ex_drawpixels, ex_lockbitmap, ex_multiwin, ex_subbitmap, ex_transform
Most helpful discussions:
- Problem toggling between Window and Fullscreen (1)
- Section of Code Lagging the Program
- Problem with al_creat_bitmap
- Convert *bitmap to char buffer
- al_map_rgb() only works after al_init() contrary to the documentation
- Allegro5 and OpenGL. Problem with drawing Allegro primitives
- Multiple layer scrolling problem
- You're such a disappointment.
- Why is this throwing an error???
- [Android] Backbuffer sub-bitmap crash
Other recent discussions:
- al_set_target_bitmap on windows performace
- How to show the draw of subbitmap in screen
- Stepping Into the Third Dimension
- How can i solve it?(draw_bitmap)
- Drawing bitmap on the display rather than on the map
- Fastest way to draw many (many!) primitives
- event loop best practice
- scaling low-res screens
- Learning shaders, one and for all.
- Allegro 5 Multithread Issue