I’ve problem in mouse clicking.I want choose some points in the window using mouse clicking.But when I click the mouse it shows a point close to the cursor not at the tip of the cursor. I’m using
void MouseHandler(int button, int state, int Mx, int My)
{
float mx,my;
mx = -100.0 + ((float)Mx / 1000.0) * 200.0;
my = 100.0 - ((float)My / 1000.0) * 200.0;
}
with
glOrtho(-100.0,100.0,-100.0,100.0,1.0,-1.0);
and
glutInitWindowSize(1000,1000);
glutInitWindowPosition(100,100);
Moreover If i want to changethe cursor as a cross when I choose a point and show the co-ordinate as well in 2D how can I do that?