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

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


As you know, the primitives addon currently supports textured primitives. To accomplish that, each vertex has a pair of UV coordinates. Right now, they represent the parametrized location on the texture, with (0,0) being one corner of the bitmap and (1,1) being the opposite corner. Elias suggested that it may be better to de-parametrize them and use pixel coordinates. In the previous example, the other corner would then be (bitmap_width, bitmap_height). This would be done for consistency with al_draw_bitmap_region and the like, and a general perception of ease of use. If this is what is decided to be done, this would be implemented via texture transformations, which both D3D and OGL have, so there's no problem on that front.

Are there any strong opinions on this one way or another?

My preference is slightly to keeping them parametrized, since that allows you to easily swap textures with similar images at different scales, without fiddling with the coordinates. But that may be a rare enough operation for it to not matter.

Thanks,

SiegeLord


      




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