View Full Version : Thick Outlines
08-07-2007, 01:45 PM
I´m trying to draw 2D figures with a thick outline.
I tried to draw them with PolygonOffset and also with the Stencil buffer, but as the outline gets thicker it looses it´s smoothness and starts to look as a sequence of rectangles.
Is there any other method to draw 2D figures with a thick outline?
Thanks in advance
08-08-2007, 06:56 AM
Yes. Couldn't resist. ;)
You could render the outline as QuadStrip generating a mitered wide line, but you need to be very careful about the vertex placements in that strip.
Here's a really nice but advanced method:
08-09-2007, 06:59 AM
Another option is to use the stencil buffer to render an outline and them blur the outline a little to make it thicker. This is probably a slower than the previous method mentioned but it was the first alternative I could think of.
08-10-2007, 01:52 PM
Thanks for the responses, but they seem far ahead of my possibilities (i´m a newbie by all means).
With glPolygonOffset I drew the outline first and the solid polygon last and it worked ok (except that i had the problem described in my previous post)
Now i´m trying to draw the polygon with glPolygonOffset twice. First with some offset to make it bigger, and then as is.
But no matter what i pass to glPolygonOffset, I cannot make the bigger polygon appear.
I´m trying something like this:
glPolygonOffset(//any value, //any value);
//draw blue bigger polygon
//draw red polygon
Powered by vBulletin® Version 4.2.3 Copyright © 2016 vBulletin Solutions, Inc. All rights reserved.