Re: [AD] 5.1?

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


On Tue, Apr 27, 2010 at 1:40 AM, Pavel Sountsov <slabode@xxxxxxxxxx>
wrote:


Secondly, there's the point that A5 is a 2D library by
default, and thus many bits of it (specifically the memory drawers
both
in the core and the primitives addon) just don't support it at this
time. Primitives addon can be extended to handle them relatively
easily,
but the PARALLELOGRAM_MAP probably will need to be rewritten.


What are the drawbacks of removing parallelogram_map completely?


Effort will need to be expended to write a replacement. Or, effort
will
need to be expended to put the primitives addon into the allegro core.


Yes, that's what I was hoping to get some insight on. Isn't the
primitives API completely capable of doing the same thing already?

Yes, it is. For hardware accelerated mode, there probably won't be any price to pay for this. For software drawing the tradeoff (right now) would be higher rendering quality (PARALLELOGRAM_MAP does not produce the best looking output) at the expense of slower speed. I am not 100% of the slower speed point, but I'm reasonably sure that the memblit.c scaling functions are faster than the triangle rasterizers; PARALLELOGRAM_MAP might be slower than them, though, perhaps. Also, there are some heavily optimized pathways that the primitives addon just ignores, things like screen->bitmap and screen->screen when there is no current transformation. Those will suffer without similar optimizations in the primitives addon.


And there's no need to move anything into the core... just move image
drawing into the primitives addon which is more where it belongs. No reason to have al_draw_image() "in the core" when not even al_draw_line() is. I put it in quotation since I think there isn't much of a problem if those two aren't cleanly separated where it would make things harder to implement.

I'm not sure what you mean here. What is cleanly separated? In terms of sticking the bitmap drawing into the primitives addon... well, it's possibly in principle, subject to the performance penalties above. Also there's the issue (not sure how important it is) that you wouldn't be able to do "anything" with Allegro core without at least one addon, a concern for some people.

Just thinking *really* outside the box here... it might be neat to have a pluginable graphics system too... just like we have for bitmap loading. This might be way out there though :P

-SiegeLord





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