Re: [AD] Bug in clip3d_f() / polygon3d_f()

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


Ben Davis wrote :
> 
> They may not actually be at the left and right.
> 
> This eliminates the need for a clockwise/anticlockwise test.

And this is why I said your patch is nice. I was a bit stuck on the idea
that the left_edge must actually be the left edge and right_edge the
right edge. You were not :-)

> 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 :-)

> 
> You could say they're 2-pixel thick then :-) They appear 1-pixel thick on
> the screen. It's that fceil() function that does it, I think - otherwise
> there wouldn't be a gap to fill with a thin polygon. Would it be better to
> round it to the nearest?

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.

> 
> QUESTION: In the last WIP or whenever, setting u,v to whole numbers would
> indicate the centre of a texel. In the version I got from CVS and modified
> (probably 1.9), setting u,v to whole numbers would indicate the top-left
> corner of a texel. I thought this was a bug-fix, and I was pleased. 

This is a matter of convention, this is absolutely not a bug.

> Then I realised it had changed back in version 1.10. Is there a reason for this?

Yes, otherwise the bottom and left texels of textures are not displayed
in the
interactive 3d test in tests/test and in examples/ex3d. So I changed
back the functions in order to keep consistent with the last WIP.

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

        Bertrand.



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