Take the 2-minute tour ×
Game Development Stack Exchange is a question and answer site for professional and independent game developers. It's 100% free, no registration required.

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.

share|improve this question
add comment

1 Answer 1

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.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.