Thoughts on simplified 2D solid+wireframe scenario

Hi,
My scenario is rendering non-complex 2D polygons (by 2D I mean the Z values of the vertexes are all the same) and I want to draw the boundary edge with a line. Currently I pre-triangulate the polygon (i.e. on model load), render that with GL_TRIANGLES and then render the polygon points with GL_LINE_LOOP (with an offset). This works, but I’d like more flexibility e.g. very thick lines.

I was thinking I could generate a smaller interior polygon and render it over the top of the original triangulated polygon (again with an offset). Not the most efficient (I could probably generate a tri-strip for line instead of the larger polygon).

I’ve also been looking at single pass wireframe drawing and I like the idea of a single pass. I’m wondering if it could be simplified for my situation?

Any thoughts on this or other ideas?

Cheers,

Stuart.

The technique you refer to would generalize nicely to your situation, without any tweaking.

I have posted a vertex and fragment shader on my web page for doing the single pass solid + wireframe. I have found that the AA for the lines is stunning, if nothing else.