On 9/13/06, Matt Lavin <[EMAIL PROTECTED]> wrote:
> I haven't completely finished the conversion to generate triangles
> instead of scanlines, but it would be very easy for me to make it
> generate trapezoids instead of triangles.
>

Thats part of it :)

I'm saying what is really needed is for the front end polygon renderer to
generate trapezoids then render those.
These can be rendered directly as scanlines or further converted to
triangles in the case triangles are accelerated.

Also the trapezoid api is quite useful as a backend api for other
rendering engines.

In particular take a look at the directfb cairo backend.

A high level polygon routine is nice to have but if we can get a good
implementation of trapezoid rendering then it makes it much easier to
support 2D engines.

The reason for not going with the polygon render in the case of a
complex path is that this requires you to convert all the points to
the list format of the call which may not match the frontend engine so
you have to allocate. By exposing a trapezoid api any front end that
handles polygons can easily feed the trapezoid rasterizer.

So I'm asking for two calls.
1.) Polygon
2.)Trapezoids.

Mike


> Mike Emmel wrote:
> > I agree the software fallback should just be the generic polygon fill.
> >
> > A bit warped but if ..
> >
> > If you have hardware accel triangle then poly uses that
> > If not you do scanline and the triangle fallback just calls the poly
> > fill.
> >
> > As a note for cairo a optimized case of filling trapezoids would really
> > help.
> >
> > Something like
> >
> > http://www.cs.unc.edu/~dm/CODE/GEM/chapter.html
> >
> > Anyway to note your dealing with traps would be cool.
> >
> > I've not looked at your algo but if you do
> >
> > poly->traps ---? triangle/scanline
> > and we have a api for trapezoids it would work very well with 2D front
> > ends.
> >
> > Fast trapezoid drawing is very very useful as a backend for most 2D
> > engines.
> >
> >
> > On 9/13/06, Ville Syrjälä <[EMAIL PROTECTED]> wrote:
> >> On Wed, Sep 13, 2006 at 07:41:30AM -0400, Matt Lavin wrote:
> >> > That's an interesting question with respect to my desired changes.
> >> Last
> >> > night I thought of a change I could make so that the polygon is
> >> rendered
> >> > with triangles instead of scanlines.  Would it be better to render
> >> with
> >> > fillTriangle calls because it is usually hardware accelerated?
> >>
> >> Yes, it should be faster. However if FillTriangle isn't hw accelerated
> >> then it would probably be faster to use scanlines (FillTriangle sw
> >> fallback uses scanlines anyway).
> >>
> >> --
> >> Ville Syrjälä
> >> [EMAIL PROTECTED]
> >> http://www.sci.fi/~syrjala/
> >>
> >
>
>

_______________________________________________
directfb-dev mailing list
directfb-dev@directfb.org
http://mail.directfb.org/cgi-bin/mailman/listinfo/directfb-dev

Reply via email to