Re: [AD] Meaning of the texture coordinates for the primitives addon

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


On 2009-08-26, Peter Wang <novalazy@xxxxxxxxxx> wrote:
> On 2009-08-25, Elias Pschernig <elias.pschernig@xxxxxxxxxx> wrote:
> > On Tue, 2009-08-25 at 16:52 +0200, Anders Andersson wrote:
> > > I think it may be good to support both 0-1 and 0-bitmap_size. Why choose one?
> > > 
> > 
> > Supporting both (but with default being pixels) doesn't sound bad. Maybe
> > have an al_use_texture_transform function?
> 
> Well, my first reaction is that you'll end up with code using different
> conventions, so now you have to know what convention is in effect when
> reading/writing code and switching between them at runtime.

Actually, here's a counterproposal:

For the same reasons that you want parameterised (normalised) texture
coordinates, al_draw_scaled_bitmap, al_draw_rotated_scaled_bitmap, etc.
should take parameterised coordinates for the source bitmap.
The destination coordinates would still in be pixel coordinates.


Questions about adding transforms to the core library:

1. Does that mean we remove al_draw_rotated/scaled_bitmap?

2. Can we support transforms efficiently for TTF fonts?  I assume bitmap
fonts would be fine.

Peter




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