detect lines drawn with a specific thickness?

Hi… is there a way to detect the lines drawn with a specific thickness?


what do you mean by detect? be a little more specific…
Regards Chris

I draw silhouettes with a thickness of 3 pixels and inner lines with 1 px… and this is done with OpenGL… now I’d like to store the coords of the two points of each edge on the silhouettes(which are drawn with a thickness of 3 pix) in arrays…


Do you draw the lines with different line widths or is the silhouette algorithm working differently and you get only the effect of 3 pixels wide lines?

If you already can decide when the glLineWidth is set to 3 for lines on the silhouette, it shouldn’t be a problem to store those line coordinates.

I may be missing some detail here, but if you are drawing the lines, don’t you already have the coordinates? Your question would seem to suggest not, therefore, how are you drawing the silhouette?

ok, why don’t you store the points while drawing. After rendering its not possible to detect the 3pixels lines.

DaViper gave me the answer I’m looking for… I needed for instance to detect lines with a 3px width… sorry for not having been clear enough… I draw the silhouettes with the stencil buffer… thus it does not give me the coordinates of the silhouettes unfortunately!


I think the best way to do such thing is (pseudocode) :

//starting of line part
glPushName(one name)
//your code here
glPopName(one name)

Then to use pciking with the select buffer to retrieve names of selected lines.

That’s just a clean implementation of selecting things, of ourse if you can store the coords while drwaing is better.