LWJGL Forum

Programming => General Java Game Development => Topic started by: matheus23 on June 30, 2012, 16:11:21

Title: Game Cursor objects with full transparency
Post by: matheus23 on June 30, 2012, 16:11:21
Hello you guys here.
I hope you can help me with ideas.

I want to have a cursor working similar to Mouse.setCursor(...), but rendered on the OpenGL context itself, cause I 1. need full transparency palett, and 2. want to render things on top of the cursor.

I have tried out things with Mouse.setGrabbed(...) and positioning the cursor right, after the cursor went outside the window. But that does not work like expected. Also Mouse.clipMouseCoordinatesToWindow(..,) does not work for me?!?
Title: Re: Game Cursor objects with full transparency
Post by: CodeBunny on June 30, 2012, 17:12:03
Make the cursor invisible and just render something in-game.
Title: Re: Game Cursor objects with full transparency
Post by: matheus23 on July 01, 2012, 09:56:10
Quote from: CodeBunny on June 30, 2012, 17:12:03
Make the cursor invisible and just render something in-game.
1. How would I set the cursor to something invisible? Using Mouse.setCursor(...)? And then what IntBuffers do I use? Also, how do I set the cursor back to the native one?
Title: Re: Game Cursor objects with full transparency
Post by: CodeBunny on July 01, 2012, 13:15:19
I'm not sure if Mouse.setGrabbed(true) would work for you, I forget what it does exactly. At the very least it will hide the mouse, I'm not sure if it also constrains movement.

You can always set the mouse cursor to be a transparent image.

LWJGL really needs better cursor support...