is there a way to find the position of the mouse on the window? or perhaps a way to find the x,y coordinates of the window? Its not too useful (in windowed mode) to get the x,y coordinates of the mouse if you don’t know where the cursor is in relation to the window… or am I stuck with ‘just run in fullscreen’ ?
Er, the Mouse.getX/Y returned should be relative to the OpenGL display (although it might be upside down to what you’re expecting). If its not then that’d be a bug…
I’ll have it print out some numbers today (don’t know why I didn’t think of that last night… too tired), but the way it was behaving certainly seemed as if it were giving absolute screen coordinates.
edit: yup bug in my program
I placed the object at at Game.HEIGHT/2 (768/2), but I need to scale my mouse coordinates because my window size is 640x480, but ‘game’ size is 1024x768. In other words, my glViewport has dimensions: 640x480 (this part may vary), but my call to glOrtho2D has dimensions of 1024x768 (this always stays the same).