I have a question about the effect of glPointSize and glLineWidth on
picking. I have code that is able to return a hitlist for polygons on
the screen for a one pixel picking box. When I try to pick points and
lines, it also works fine. When I change the point size or the line
width, however, the picking no longer works for points and lines
unless I pick the exact center of the points and lines.
I could have sworn that picking is an operation that is applied after
rasterization in the OpenGL pipline. Can anyone explain this behavior
to me? Is there a work around?
--- parente@... wrote: > I have a question
about the effect of glPointSize
> and glLineWidth on
> picking. I have code that is able to return a
> hitlist for polygons on
> the screen for a one pixel picking box. When I try
> to pick points and
> lines, it also works fine. When I change the point
> size or the line
> width, however, the picking no longer works for
> points and lines
> unless I pick the exact center of the points and
> I could have sworn that picking is an operation that
> is applied after
> rasterization in the OpenGL pipline. Can anyone
> explain this behavior
> to me? Is there a work around?
One work around might be to draw multiple parallel
Do you have the code? Maybe it is an issue with your
Which opengl implementation do you use?
Do You Yahoo!?
Everything you'll ever need on one web page
from News and Sport to Email and Music Charts
From: Peter Parente <parente@cs...> - 2003-01-14 23:55:00
I actually found the answer in the OpenGL advanced notes after some
searching. Note the starred section.
"The OpenGL selection method determines that an object has been hit if it
intersects the view volume. Bitmap and pixel image primitives will generate
a hit record only if a raster positioning command is sent to the pipeline
and the transformed position lies within the viewing volume. To generate hit
records for any point within a pixel image or bitmap, a bounding rectangle
should be sent rather than the image, and selection testing performed on the
interior of the rectangle. ****Similarly, wide lines and points will be
selected only if the equivalent infinitely thin line or small point would be
selected. To facilitate selection testing of wide lines and points, proxy
geometry representing the true footprint of the primitive should be used