al_create_bitmap
ALLEGRO_BITMAP *al_create_bitmap(int w, int h)
Introduced in 5.0.0
Creates a new bitmap using the bitmap format and flags for the current thread. Blitting between bitmaps of differing formats, or blitting between memory bitmaps and display bitmaps may be slow.
Unless you set the ALLEGRO_MEMORY_BITMAP flag, the bitmap is created for the current display. Blitting to another display may be slow.
If a display bitmap is created, there may be limitations on the allowed dimensions. For example a DirectX or OpenGL backend usually has a maximum allowed texture size - so if bitmap creation fails for very large dimensions, you may want to re-try with a smaller bitmap.
See also: al_set_new_bitmap_format, al_set_new_bitmap_flags, al_clone_bitmap, al_create_sub_bitmap
Examples: ex_bitmap_target, ex_blend, ex_blend2, ex_blend_test, ex_blit, ex_clip, ex_draw, ex_draw_bitmap, ex_filter, ex_gldepth, ex_icon, ex_lines, ex_lockbitmap, ex_logo, ex_mixer_pp, ex_mouse_cursor, ex_nodisplay, ex_opengl_pixel_shader, ex_pixelformat, ex_premulalpha, ex_prim, ex_rotate, ex_scale, ex_threads2, ex_transform
Most helpful discussions:
- [a5] Starting from scratch with a bitmap:Cant draw to target. Need to set flags? (2)
- Problem toggling between Window and Fullscreen (1)
- [A5] Copying a bitmap from a transformed screen (1)
- Allegro 5.2.2 Setup
- KrampusHack 2016
- [A5] Show & Hide window/display Cross-Platform ?
- Why some Shaders don't work !
- Complications when drawing FPS
- save display window as image(png,jpg)
- Font loading crashing with Allegro 5.2
Other recent discussions:
- Inconstistent joystick event delay
- Display stops updating if I change the backbuffer-- What am I doing wrong?
- Lightning with some light points
- Coordinate systems
- Keyboard Interrupting on Mouse Positions?
- d3d_disp->render_target is NULL, segfault
- extrude tool
- Image transition too slow !
- Blit to Android display
- Scaled font print call?