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:

Other recent discussions: