[AD] Pixel graphics routines and transformations

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


One of the last bits that still does not play completely well with transformations are the pixel drawing routines (al_draw_pixel, al_put_pixel and al_get_pixel). It is no problem, of course, to implement the appropriate functionality... but the question is what to do with the primitives addon, which relies on them reasonably heavily. The software component of the addon does all the transformations itself, and requires the pixel putting routines to be untransformed. It uses al_draw_pixel for blended primitives, and al_put_pixel for non-blended ones. Several solutions come to mind:

1. The simplest solution is to make all those functions respect the transformations, and modify the addon to reset the transformations to identity before it draws anything

2. Make a subset of those pixel drawing routines ignore transformations (e.g. al_put_pixel and al_get_pixel). However, this requires a solution for blended primitives (which need an untransformed equivalent to al_draw_pixel).

3. Avoid the whole issue by making all pixel drawing routines ignore transformations.

In addition to the above considerations, there may be teleological concerns. It might not even make sense for al_put_pixel/al_get_pixel to be affected by transformations since those are not 'true' graphics operations, instead being something that is used to modify textures or whatnot.

Any thoughts?

-SiegeLord




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