Re: [AD] fix for using transformations without a display and make blending mode a per-display state

[ Thread Index | Date Index | More lists.liballeg.org/allegro-developers Archives ]


On 2010-03-03, Elias Pschernig <elias.pschernig@xxxxxxxxxx> wrote:
> This patch does not move the current transformation out of the display
> into TLS (it was the solution Trent agreed to in the opengl fix thread)
> but instead makes the blending mode a per-display property just as the
> current transformations already was.
> 
> For something like drawing into a memory bitmap to still work when there
> is no current display, I used a trick suggested by Evert on allegro.cc -
> as a special case store the per-display state in TLS anyway if there is
> no display. (In the code an empty ALLEGRO_DISPLAY is put into
> tls->memory_display, which has no other function but to contain a
> current transformation and blending state.)

I like it.

> I also added ALLEGRO_TRANSFORM as new option to al_[re]store_state and
> removed some outdated code.
> 
> I didn't yet try to copy over the TLS state to a newly created display,
> or save the state of the last destroyed display to TLS, as is done in
> Evert's suggestion - it's probably not very common to hit one of those
> circumstances and it's hard to say what the expected behavior should be.

I would not expect either of those things to happen.

Peter




Mail converted by MHonArc 2.6.19+ http://listengine.tuxfamily.org/