I am making a game with glut in c++ and I want to write a condition that if at a certan point (coordinate) the color in the canvas is black then my object is supposed to move, otherwise, it stays at its place. I was hoping if I could get the syntax for that (e.g. if(x==color[Black]){ move } ).
Regards. P.S. I am new to glut so please feel free to ask me aything if you want any specifics.