Hi
I have a program which im testing and id like to know what is the best way to print out the value of a color to the screen. I am using the GLUT API.
the function that im trying to use is called:
glutGetColor(y, GLUT_RED)
where int y is the value that is sent through from the y mouse coordinate.
id like to print out the color where ever the mouse is situated in the window. but it just prints out -1. i know that the value of ‘y’ in the glutGetColor() has to do with a cell call? so can i just send through the mouse coordinate into that place? it seems like it doesnt work.
the function im using to get the mouse coordinate is:
glutPassiveMotionFunc(int x, int y)
any help would be wonderful!
thanks