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:
- Problem toggling between Window and Fullscreen (1)
- [A5] Copying a bitmap from a transformed screen (1)
- [a5] Starting from scratch with a bitmap:Cant draw to target. Need to set flags? (1)
- linking on ubuntu
- Saving Bitmaps
- Problem with al_creat_bitmap
- A5 Fullscreen Vs Windowed
- Need some help with shaders
- Convert *bitmap to char buffer
- Bitmap usage with memset and memcpy
Other recent discussions:
- A shader that sets transparancy
- Allegro5 and OpenGL. Problem with drawing Allegro primitives
- GLSL Shader and bit operations on a state (FHP LGCA Simulation)
- Multiple layer scrolling problem
- You're such a disappointment.
- using a photo to floofill a bitmap
- Scaling look likes junk.
- Problems porting to linux. Video crashes
- Getting Allegro to Play Nice with Windows Scaling Settings
- help: memory bitmap background image causing artifacts