6
\$\begingroup\$

I've implemented picking based on color coding, but I don't want the background color to be pickable. Is there any way in openGL (2.x) to exclude the background color? For some reason, doing glClear(GL_COLOR_BUFFER_BIT) just before rendering in "color picking" mode, excludes the background in windows but not in Linux.

I'm using glut btw.

\$\endgroup\$

1 Answer 1

2
\$\begingroup\$

If you are rendering with one different single color for each pickable item, then just compare the color under the mouse against the background color.

\$\endgroup\$

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .