ALLEGRO_STATE(3)
π NAME π
ALLEGRO_STATE - Allegro 5 API β and yes bestie, this is page ALLEGRO_STATE(3) from the Library Functions Manual, so you know it's official. π
πΈ SYNOPSIS πΈ
typedef struct ALLEGRO_STATE ALLEGRO_STATE;
π¦ DESCRIPTION π¦
okay so ALLEGRO_STATE is an opaque type β meaning the internals are a mystery on purpose, and you literally just pass it to al_store_state(3) / al_restore_state(3). No peeking. π
The various state kept internally by Allegro can be displayed like this (yes, the whole tree, because we do not skip):
global
active system driver
current config
per thread
new bitmap params
new display params
active file interface
errno
current blending mode
current display
deferred drawing
current target bitmap
current transformation
current projection transformation
current clipping rectangle
bitmap locking
current shader
so here's the tea, bestie: in general, the only real global state is the active system driver. All the other global state is per-thread, so if your application has multiple separate threads they never will interfere with each other. (Except if there are objects accessed by multiple threads, of course. Usually you want to minimize that though, and for the remaining cases use the synchronization primitives described in the threads section or events described in the events section to control inter-thread communication.) π«Ά
that's the whole page, bestie β xoxo, the Allegro reference manual π. page: ALLEGRO_STATE(3); date: not listed on this page, sorry! π
π¦ where this page comes from
- arch rolling: allegro 5.2.11.3-2 Β· Zlib AND BSD-3-Clause AND OFL-1.1 AND LicenseRef-Custom
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms