RE: [AD] Bug in clip3d_f() / polygon3d_f() |
[ Thread Index |
Date Index
| More lists.liballeg.org/allegro-developers Archives
]
> > Do you want me to remove the leading underline as
> > well (fill_... as opposed to _fill_...)?
>
> Well, does it really matter ? I mean let's leave them the way they
> are since it prevents you from removing those underlines through the
> whole file :-)
I think Shawn has conventions for this. If it's static, it doesn't need an
underline - otherwise it does.
> Damned ! The subpixel accuracy is precisely designed to prevent gaps to
> appear between polygons that share vertices. Do you mean it fails ? From
> my own experience I saw it works very well. BTW fceil() function *must*
> be used to perform subpixel accuracy ; rounding to nearest value
> generates unpredictable round-off.
I have one polygon whose vertices have x-coordinates of 0 and 1. I have
another polygon whose vertices have x-coordinates of 1 and something big.
They share a column on the screen, namely x=1. No gap appears. Before I
applied my patch, the left-hand polygon didn't draw. Now it draws, and
appears 1-pixel thick. There is no bug here - just a misunderstanding.
I thought rounding to the nearest would avoid having the polygon on the left
at all - it is the result of clipping, and if the computer were completely
accurate, the polygon's right edge would coincide with the screen's left
edge - the polygon would not be visible at all. I'll investigate.
> > IMHO it's better the way it was in version 1.9. Otherwise I'll
> have to be
> > persistent and use -0.5 and 127.5 for my texture coordinates :-)
>
> As I said before, it is a matter of convention : you think it is better
> the way it was in version 1.9 but some other people might think version
> 1.10 is better ;-)
> Anyway, if we choose your convention we must :
> 1. Change every example in the lib to be consistent with this choice.
> 2. Change the docs to tell the texture coordinates now indicate the
> top-left corner of the texel.
I'm happy to do number 1. As for number 2, here's a quote from the docs:
"The u and v coordinates are only required when doing texture
mapping, and specify the position of the point in the texture
bitmap, for example 0, 0 maps the vertex onto the top left corner
of the texture, and if the texture is sized 32x32, setting u=32
and v=16 maps the vertex to the point half way down the right edge
of the texture. The u/v coordinates wrap at the edge of the
texture, so with a 32x32 texture, u=v=32 is the same as u=v=0.
This can be used to tile textures several times across a polygon."
I think "the top left corner of the texture" is the top left corner of the
texture, not half a texel's width and height into the texture. Likewise
"half way down the right edge of the texture" does not mean slightly further
than half way down, and beyond the right edge of the texture :-P
Anyway, I'm happy to change all the examples and the test and so on - just
leave it to me. Tell me if you don't want me to...
Ben Davis