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-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.

> The reason I think pixels should be the default is for consistency with
> the screen coordinates, which which default to pixel positions. And
> those are good to default to pixel coordinates because many users will
> assume them. (Those who don't will find al_use_transform anyway.)

I think 0-1 is conventional for texture coordinates, and I agree with
Trent that the y-axis should be positive downwards.

Peter




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