Click here to Skip to main content
15,887,746 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I'm trying to make a color picker tool using OpenGL, and have made a reasonable demo. When I click a color it uses the glReadPixels function to find the color. This does work however it also takes the color of the background when I click on the background. Is there a way to see if I clicked on an object, here the color picker.

What I have tried:

I have tried nothing so far, as I dont understand how to approach such a problem.
Posted
Updated 10-May-19 23:51pm

1 solution

Have you tried some basic examples on how to handle mouse in opengl?
opengl click handler[^]
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900