Hi there,
I’m new to OpenGL, but I’m hoping someone can point me in the right direction.
I want to check if GLUT_LEFT_BUTTON and if click is within the region of my square. The only problem is I’m not sure the syntax for checking if its in the bounds of that square.
void mouse(int button, int state, int x, int y)
{
switch (button)
{
case GLUT_LEFT_BUTTON:
if (state == GLUT_DOWN)
{
//do work here
}
break;
....
default:
break;
}
}