0

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.

noobkid
  • 17
  • 7
  • Can you post a code snippet? – Andreas DM Jul 08 '15 at 01:08
  • i would if i knew what to post...i have been provided with functions to draw shapes. so what i intend to do is to check whether the coordinates of the square shape are not changing if the next coordinate does not lies on black plane. – noobkid Jul 09 '15 at 16:27

0 Answers0