PDA

View Full Version : mouse + general question



not_yet
06-02-2004, 09:22 PM
hello all,

noob questions follow

first question:

when I search the forum I get only replys from the year 2000? even though I have it set to any date? :confused:

2nd

using linux/glut

when I click the mouse on the screen what are the x, y parameters I'm getting back from glutMouseFunc?

I have tried (for x)

temp = glutGet( GLUT_WINDOW_X);
printf( "window_x=%i\n", temp );

but I don't seem to be able to get the mouse x,y coordinates?

thanks

malancha
06-02-2004, 10:49 PM
glutGet(GLUT_WINDOW_X) will give you the x-coordinate of the window, not of the mouse. To get the mouse coordinates you have to look at the values passed to the mouse callback functions.

CrazyButcher
06-02-2004, 11:03 PM
there is a little "more/next" or so button to the top left of the listed answers
which will give you more answers to the search, right where the "stats" for the search are I think

it will just start with the oldest results.

when you register your mousecallbacks e.g.

glutMotionFunc(mouseInput);
glutPassiveMotionFunc(mouseInput);

void mouseInput(int x,int y);

in the mouseinput func x and y will be the screenpos