ALLEGRO_STATE
typedef struct ALLEGRO_STATE ALLEGRO_STATE;
Introduced in 5.0.0
Opaque type which is passed to al_store_state/al_restore_state.
The various state kept internally by Allegro can be displayed like this:
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 clipping rectangle
bitmap locking
In general, the only real global state is the active system driver. All 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 synchronization primitives described in the threads section or events described in the events section to control inter-thread communication.)
Examples: ex_blend2, ex_blend_bench, ex_blit, ex_clip, ex_draw, ex_logo, ex_threads
Most helpful discussions:
- Allegro5 and OpenGL. Problem with drawing Allegro primitives
- Draw to bitmap failing
- Storing the clipping rectangle with al_store_state
- git format-patch: troubles with white space trailing
- video & physfs problems in the same file
- Good programmig practice light effects
- KrampusHack 2016
- Lightning with some light points
- Mask / combine bitmaps
- Mode 7 graphics in Allegro 5...
Other recent discussions:
- Scaled font print call?
- [a5] al_create_bitmap() not creating mipmap in OPENGL
- Is this me or Allegro?!?
- Combining Allegro 5.1.8 with OpenGL culling problems
- If it's true, you don't believ in the afterlife.
- Al_save_bitmap only saves a blank png
- Load bitmap from zip file
- al_save_bitmap not working!
- [A5] Just Sharing a simple screen shot function
- Developing in Windows, Need a Linux port