Re: [AD] clipping line algorithm

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


Eric Botcazou wrote:
[snip]
And rotate.c, gsprite.c and c/cstretch.c need modifications to take care
of case (3).

Can we use parallelogram_map / stretch_* outside of the vtable? If not, then this is not really needed as the driver's vtable can implement rotation and scaling however it wants; AllegroGL can work comfortably this way.



It is of course invalid for a bitmap to have both BMP_ID_PLANAR and
BMP_ID_NONLINEAR_NONPLANAR flags set at the same time. Only add-ons like
AllegroGL need to set the BMP_ID_NONLINEAR_NONPLANAR flag.

I think that with this fix, any piece of code that currently assumes no
bitmaps are of type (3) will still work fine with type (1) and (2)
bitmaps. We can easily fix Allegro to allow case (3). Also, this
solution does not imply any problems with flags saved on disk. What do
you think?


I think this is interesting and could be worth implementing, but I'd like to hear from Bob before. One minor nit: the name of the flag is ugly :-)


So, basically, if this new flag is not set, the library would be allowed to bypass entirely the vtable of the bitmap? I'm still a bit uncomfortable with this idea.

I don't like the idea of bypassing the vtable. If we can, we should have a putpixel and _putpixel vtable entry. This should solve most of the issues. By default, _putpixel() can be aliased to putpixel() if the implementation doesn't (or can't) accelerate the case of non-clipped putpixels.


--
- Robert Jr Ohannessian
http://bob.allegronetwork.com/






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