Position of a GLUT window

Hi,

How do I get the position coordinates of my GLUT window?

I can set its position with glutPositionWindow(x,y) but I didn’t find a possibility to retrieve its position.

Can someone help??

Thanks

You have to keep track of that yourself. Actually this is not a problem since you specify the initial window size and supply a callback for the window resizing. Just record the position/sizewhen you create the window and update the position/size in your resize callback.

Yes, but the problem is: the resize callback doesnt give me the window’s position coord., it gives me only the width and height of that window… :

void glutReshapeFunc(void (*func)(int width, int height));

check this out
http://www.opengl.org/developers/documentation/glut/spec3/node70.html#SECTION000101000000000000000

specifically

glutGet(GLUT_WINDOW_X)
and
glutGet(GLUT_WINDOW_Y)

That’s what I was looking for, thanks