liballeg / allegro5

The official Allegro 5 git repository. Pull requests welcome!
https://liballeg.org
Other
1.9k stars 285 forks source link

Add "al_get_render_state" #1583

Closed MarkOates closed 1 month ago

MarkOates commented 1 month ago

During some debugging, I noticed I didn't have access to the current render state, which would be helpful. This would be particularly useful in instances where different parts of a game system manage render state differently, and checking for possible leaky render state. The values for it seem to be stored in ALLEGRO_DISPLAY.

Some points to be aware of in this PR:

SiegeLord commented 1 month ago

Thanks!

MarkOates commented 1 month ago

Sweet! I missed the merge notification on this one.

I've already had several times where this would be useful. Thank you!