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

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


Ben Davis wrote :
> 
> Rather than ensuring the
> edges are stored in clockwise order, the routine is now adapted to handle
> both scenarios.

Well, the routine already handled both cases. At least, it was supposed
to :-)

>
>  I had to change
> the prototypes in aintern.h - but seriously, do those prototypes need to be
> there?

I guess some people planned to use them in some other routines. 
IMHO fill_3d_edge_structure[_f]() can safely be declared 'static' and
the prototypes can be removed from aintern.h

> 
> > However, I can say for sure that this problem was introduced
> > since the last WIP, and exists in the CVS version. I suspect it was
> > introduced when the polygon3d functions were given proper sub-pixel
> accuracy
> > (or did I imagine that? :-)
> 
> I can't explain this. If I had the motivation to look at the old file from
> the WIP, I probably could explain it, but since it works now, there's
> probably no point.

Routines in poly3d.c have been massively rewritten since the last WIP.
The main purposes were to add subpixel and subtexel accuracy but also to
focus on FLAT poly speed enhancement. This is why the routines has
changed so much. BTW I introduced some bugs which did not exist in the
last
WIP :-( I have released some patches to fix them and I hope your patch
fixes the very last bug of poly3d.c

> 
> > At the same time, I'd like to point out that the polygons often miss the
> > left and top edges of the screen by 1 pixel. This never used to happen.
> 
> I think this must just have been 1-pixel-thick polygons not appearing at the
> edges, because the gaps are filled with 1-pixel-thick polygons now, using
> the new patches. Weird :-)

A 3D polygon rasterizer *never* draws 1-pixel-thick polygons. In fact
the right and bottom edges of a polygon are not drawn in order to avoid
overdrawing.
I don't understand how your patch fills the gap with 1-pixel-thick
polygons ?!?

Anyway, you did some really nice job.

	Bertrand.



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