[AD] About the speed of flat polygon primitives

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


See the message from Paul Fjeld dated 08/29 on [AL].

We already discussed the problem some months ago (sorry, I didn't find the
reference on [AD]): under Windows, flat polygon primitives (those that rely
on the hline() API function) are much faster if they use software drawing
than if they use hardware-accelerated drawing, the reason being the overhead
of locking/unlocking is diluted for these complex (!) primitives.

I made a proposal: adding a new field to the GFX_VTABLE structure, namely

     AL_METHOD(void, hfiller, (struct BITMAP *bmp, int x1, int y, int x2,
                       int color));

alongside the already existing

     AL_METHOD(void, hline, (struct BITMAP *bmp, int x1, int y, int x2,
                       int color));

The first method would be used in the flat polygon primitives, while the
second one would remain that which is called by the hline() API function.
Then Windows gfx drivers would only map the second one to the equivalent
hardware-accelerated primitive.

--
Eric Botcazou
ebotcazou@xxxxxxxxxx



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