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

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


Hmm, I'm not a fan of adding global flags for something like this (it'd be the first anyway, which seems a little ad hoc). Two alternatives come to mind:

1. I can expose to the user a function, al_use_texture_transform, which will allow the user to set the matrix that will be used for the texture transformations, potentially very powerful as this will allow for animated textures (just translate the uv coordinates one way or another) but would require the user to explicitly set the scaling to (1 / bmp_width, 1 / bmp_height) for the UV coordinates to be interpreted as pixels for every bitmap.

2. Once I make the flexible vertex declaration api, I can make the two UV coordinate subtypes, one that's interpreted as the parametrized coordinates, and one that's interpreted as the pixel coordinates. This way, to use the parametrized coordinates you'd have to specify this in your vertex declaration.

-SiegeLord


      




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