Somemouse problems

Hi, i have some little problems with the mouse :

1/ I want to hide the mouse cursor. So i did :

Mouse.setNativeCursor(null);

There is not exception but the mouse still show.

2/ I want to change screen resolution :


...
Display.setDisplayMode(displayMode);
...
GL11.glViewport(0,0,displayMode.getWidth(),displayMode.getHeight());
GL11.glMatrixMode(GL11.GL_PROJECTION);
GL11.glLoadIdentity();
GLU.gluOrtho2D(0.0f, 800, 0.0f, 600);
GL11.glMatrixMode(GL11.GL_MODELVIEW);
GL11.glLoadIdentity();
...

The new resolution works fine but the Mouse.getX() and Mouse.getY() do not return where the mouse is.
(It is like the mouse use the old resolution).
I try to destroy the mouse and recreate it after the resolution change but it is the same…

not sure about the latter - but the former, you have to supply an image to show - make it transparent. Otherwise use the grab method to hide the cursor.

Thanks

Mouse.setGrabbed(true);

It work well to hide the mouse.

I still have the second problem. When i lower the screen resolution, i don’t have access to all the screen with the mouse ??? (When i upper the screen resolition, the mouse can go outside the screen).

edit : What a morron :-[. I change the screen resolution but the openGL range is still for 800x600… and the Mouse.getX() return the position from the screen resolution and not from the OpenGL range. So fixed :wink: