View Full Version : mose method

04-04-2002, 03:32 AM
static void mouse (int button, int state, int x, int y )

are the int x and int y co-ordinates of the computer screen or of the program window. i have to do a drag and drop method and i heard i might have to change the co-ordinates to suit the program window. is this true or can i simply just use (x-startx) and add this to the x values of a polygon and the same for y.

04-04-2002, 12:25 PM
Here is a drag and drop example.

It is in MFC but applies generally. In 2D, to handle MS Windows mouse coordinates to OpenGL I map them back and forth as required for a more detailed explanation see the Rubber-Banding Demo.