Re: [Fresco-devel] new Path API
Nick Lewycky <[email protected]> Thu, 07 Aug 2003 03:57:41 -0400
| Newsgroups | gmane.comp.video.fresco.devel |
|---|---|
| Message-ID | <[email protected]> |
Tobias Hunger wrote: > Hi! > > What's the status of the new Path API stefan and nicholas have been discussing? > Anyone implementing it? I will do so if nobody is working on that yet... Oh I'm still here. I'd be ecstatic if you'd pick up my patches though. I've been *extra* busy at work. (New product's gold master gets burned later today.) I hope to spend more time with Fresco as soon as school starts up again in September. I designed an API based on PostScript paths and implemented the whole bloody thing, but Stefan disagreed on how generic it was: - I had no support for NURBS - I required "moveto" segments to be explicitly stated That second point is a large problem, since now with Stefan's design, I'm stuck with the responsibility of realizing that a given path represents a closed figure, even when the line segments are entirely disjoint and out of order. The good news is that this can be easily implemented in OpenGL: draw the outline of the Path to the stencil buffer, then draw a screen sized poly (possibly adjusted for texture coordinates if Fresco texturing is enabled) that using the EXT_STENCIL_TWO_SIDE[1] extension. [1] - http://oss.sgi.com/projects/ogl-sample/registry/EXT/stencil_two_side.txt > Where is the documantaion on the API? I know stefan and nicholas had lengthy > discussions about it, but I can't find any of that on the website/mailing list nor > the Wiki (search page there still gives a traceback, so I might have missed it). http://issues.fresco.org/task139 > The questions I was trying to get answered looking for the docs are: > Why NURBS and Bezier? Bezier curves are just a special case of NURBS after all. Do > we really need to provide such convinience functionality at the drawingkit level? What > about Quadrics? Aren't those special cases of NURBS as well? Sure, but I can't implement NURBS on either LibArt or PostScript, so I'd just as soon not have them. Heck, I'd rather take them out of the whole Path API since they just don't fit. Conversely, I don't object to a seperate "draw_nurbs" API mind you. It might not be clear what the difference is between claiming not to support one type of path fragment versus not supporting one API call. It's a lot easier for a caller to understand that "draw_nurbs" is NYI in a given DrawingKit, than to have partial rendering of some paths which may have been returned from another source. As for seperating Quadrics, the good news is that I can implement those without too much trouble. I can draw a circle in PostScript, even if I can't draw a NURBS in general. > I know you were talking about exactly these questions... I just don't remember for > which reason you came up with the API as it is now. Last I recall, Stefan agreed that we might need to write a seperate module responsible for "unwinding" the Paths, basically rewriting a Path into a form where all connected lines are contiguous. Don't ask me how to handle a y-fork, I don't know. Nick