create_video_bitmap(3)
π create_video_bitmap β the Allegro manual, but make it cute π
okay bestie, welcome to create_video_bitmap(3), a page straight out of the Allegro manual for the Allegro game programming library. yes we are in the Allegro docs and yes we are thriving. let's get into it π¦
β¨ NAME β¨
create_video_bitmap β literally just creates a video memory bitmap. that's it. that's the whole thing. Allegro game programming library representation, no cap π
πΈ SYNOPSIS πΈ
#include <allegro.h>
BITMAP *create_video_bitmap(int width, int height);
look at her. iconic signature. BITMAP *, two ints, and she's serving π
π DESCRIPTION π
so what does she actually do? she allocates a video memory bitmap of the specified size. main character energy fr fr.
you can use this to:
- allocate offscreen video memory for storing source graphics that are ready for a hardware accelerated blitting operation, or
- create multiple video memory pages which you can then display by calling
show_video_bitmap().
also, the docs are like "go read the introduction of this chapter" for a comparison with other types of bitmaps and other specific details β so if you want the full lore, that's where it lives πβ¨
β οΈ Warning, and this one matters: video memory bitmaps are usually allocated from the same space as the screen bitmap, so they may overlap with it. therefore it is not a good idea to use the global screen at the same time as any surfaces returned by this function. like, don't do it. i'm begging π«Ά
π RETURN VALUE π
- Success: returns a pointer to the bitmap π
- Failure: returns
NULLif you have run out of video ram π
and listen β remember to destroy this bitmap before any subsequent call to set_gfx_mode(). that is not optional, that is a lifestyle. free your memory, bestie π§
π SEE ALSO π
the whole friend group, in order, exactly as they appear:
create_bitmap(3)create_bitmap_ex(3)create_system_bitmap(3)create_sub_bitmap(3)destroy_bitmap(3)screen(3)show_video_bitmap(3)gfx_capabilities(3)is_video_bitmap(3)clear_bitmap(3)clear_to_color(3)ex3buf(3)exaccel(3)exflip(3)exupdate(3)
and that's the page!! this lil beauty came to you courtesy of Allegro, version 4.4.3 β go allocate something iconic and stay hydrated ππ
π¦ where this page comes from
- fedora 43: allegro-devel 4.4.3.1-18.fc43 Β· Giftware
- fedora 43: allegro-devel 4.4.3.1-18.fc43 Β· Giftware
- fedora 44: allegro-devel 4.4.3.1-20.fc44 Β· Giftware
- fedora 44: allegro-devel 4.4.3.1-20.fc44 Β· Giftware
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms