Main Page | Report this Page
Computers Forum Index  »  Computer - Graphics - API (Opengl)  »  Drawing halo outlines around objects...
Page 1 of 1    

Drawing halo outlines around objects...

Author Message
magic_touch...
Posted: Mon Sep 14, 2009 1:42 am
Guest
Hi,

I'm writing an openGL application in the VxWorks env. I'm trying to
find a way in which I can generate a one pixel thick black halo
(outline) around symbology that I'm drawing. For hollow objects, the
outline should be on the outer and inner surface of the symbol and for
filled objects, it's sufficient if the outline is only on the outer
surface.

I have to draw the outline for certain symbols that are built into a
display list during run-time. The instructions for drawing these
symbols are from a database that is uploaded upon start-up. And the
halo must be able to be turned on and off.

Also, when the symbols overlap, the outlines are not supposed to
intersect the symbols but rather form one continuous outline around
the overlapped symbol structure.

Is there an easy way to perform this drawing? Please drop any
suggestions or solutions that I can try out.

Thanks in advance!
 
John Tsiombikas...
Posted: Mon Sep 14, 2009 6:09 pm
Guest
On 2009-09-14, magic_touch <savita.babu at (no spam) gmail.com> wrote:
Quote:
I'm writing an openGL application in the VxWorks env. I'm trying to
find a way in which I can generate a one pixel thick black halo
(outline) around symbology that I'm drawing. For hollow objects, the
outline should be on the outer and inner surface of the symbol and for
filled objects, it's sufficient if the outline is only on the outer
surface.

I'm not clear on what do you mean by the term "symbology" are your
objects 2 or 3-dimensional? For 3d meshes, drawing outlines can be
achieved quite easily by first drawing the back faces of the object in
thick wireframe using something like:

glLineWidth(3.0);
glCullFace(GL_FRONT);
glPolygonMode(GL_FRONT_AND_BACK, GL_LINE);

And then drawing the object as usual on top of that. All the back edges
will be covered up by the filled polygons in the second pass, except
from the sillouette edges which, being thicker than 1 pixel, will still
be visible around the edge of the object.

--
John Tsiombikas (Nuclear / Mindlapse)
http://nuclear.sdf-eu.org/
 
 
Page 1 of 1    
All times are GMT
The time now is Fri Nov 27, 2009 4:46 pm