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

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


I think it may be good to support both 0-1 and 0-bitmap_size. Why choose one?

On Tue, Aug 25, 2009 at 1:40 PM, Paul Suntsov<siegelords_abode@xxxxxxxxxx> wrote:
> 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
>
>
>
>
> ------------------------------------------------------------------------------
> Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day
> trial. Simplify your report design, integration and deployment - and focus on
> what you do best, core application coding. Discover what's new with
> Crystal Reports now.  http://p.sf.net/sfu/bobj-july
> --
> https://lists.sourceforge.net/lists/listinfo/alleg-developers
>




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