Re: [AD] per-thread transformation and blending mode

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


On Thu, June 24, 2010 5:18 pm, Peter Wang said:
>> Another idea would be to keep it per-target-bitmap. For example if you
>> use transformations to make the coordinate system go from 0,0 to 1,1 for
>> the whole backbuffer it would be annoying if you have to reset it each
>> time you switch back from drawing to another bitmap.
>
> Good idea.  Each bitmap has its own clipping rectangle, and I think
> transformations go along with that.
>
> I *think* I would prefer the blending mode to be per-thread, though.

In practice I find that transformations and blending are things that change
often, even if the target bitmap doesn't change. If you're drawing a 3d (or
say a 2d skeletal animation), you're going to be switching transforms a lot,
and the case is the same for blending when you're drawing complicated scenes.
Therefore, I think they should go in the most logical place. I'm not sure
which of TLS and bitmap is the most logical, but I'd prefer TLS unless I'm
missing something. But actually the example quoted is something that would
happen often too... so I could be wrong.

Trent :n)




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