Two questions regarding to mouse input!?

Hello, I’m using LWJGL input right now, and so far so good :slight_smile:

Now i come to the function to poll whether the mouse pointer is inside the game window or not. Is there any simple way to do this?

And the next question, is this my code that wrong or it’s LWJGL input bugs : the mouse y coordinate is reversed! In a game with dimension 640x480, when the mouse y at coordinate 0, the Mouse.getY() print out 480, and when the mouse y move down to 480, the Mouse.getY() print out 0?!

LWJGL mouse coordinates are in traditional mathematical axes, like OpenGL: 0,0 is the bottom left. As for knowing whether the mouse is inside the window, we don’t have a direct API call to determine this so we might add one.

Cas :slight_smile:

Thanks! Now I got a working LWJGL to AWT input :slight_smile:
Finish porting LWJGL input and timer to my humble 2D Game Engine.
Next porting LWJGL graphics, and done, fully Java2D and OpenGL via LWJGL compatible game engine :slight_smile: