Subject:
|
Re: Why Type 5 Lines?
|
Newsgroups:
|
lugnet.cad.dev
|
Date:
|
Thu, 18 Apr 2002 01:50:50 GMT
|
Viewed:
|
569 times
|
| |
| |
In lugnet.cad.dev, Don Heyse writes:
> I can see how you might accomplish some of that by manipulating
> glEdgeFlag when you define your strips, and then redrawing with
> GL_POLYGON_MODE set to GL_LINE, but I still don't see how it
> produces the equivalent of type 5 lines. Maybe if you get the
> stencil buffer involved? Beats me...
Yeah, the stencil buffer, that's gotta be it. If you've got BFC
working then you can use the stencil buffer to count how many times
an edge is draw in GL_LINE mode. Edges on back facing triangles
won't be drawn, so you'll only count one edge where the surface
moves from front facing to back facing. That's where you want a
type 5 line to be visible. Edges shared by two front facing
polygons will be drawn twice, and edges shared by two back facing
polygons will be drawn zero times. Capture this in the stencil
buffer and then redraw, passing only fragments that match a 1 in
the stencil buffer.
I only skimmed it, but I think this may describe the algorithm.
http://www.cs.nyu.edu/~yap/classes/visual/01f/lect/l8/l.html#linkPara-8
It requires BFC and is way too complicated for me to code, but
It might help out with those substituted primitives. They must
be BFC ready.
I don't know if it'll be faster that the type 5 line method though
because you need to render the edgeline geometry twice.
Enjoy,
Don
|
|
Message is in Reply To:
| | Re: Why Type 5 Lines?
|
| (...) That sounds like glPolygonOffset which would be part of the solution because it allows the edges to look clean. We all use that already. (...) I can see how you might accomplish some of that by manipulating glEdgeFlag when you define your (...) (23 years ago, 18-Apr-02, to lugnet.cad.dev)
|
21 Messages in This Thread:
- Entire Thread on One Page:
- Nested:
All | Brief | Compact | Dots
Linear:
All | Brief | Compact
|
|
|
|