I am trying ot make an empty (transparent) cursor, but I am having no luck. From what I have read, the code below should work, but I still get a 1x1 dot.
1 2 3 4 5 6 7 8 9 10 11 12 13 14
| public void hideCursor() { IntBuffer databuffer = GeoUtils.newIntBuffer(4); databuffer.put( new int[]{0,0,0,0} ); databuffer.flip(); try { Cursor empty = new Cursor(1,1, 0, 0, 1, databuffer, null); Mouse.setNativeCursor(empty); } catch (LWJGLException e) { e.printStackTrace(); } } |
It looks simple, but I have spent hours trying byte buffers and converting them to int buffers, actually creating a transparent image and sending that, etc...no luck. It's probably something obvious, but I give up...what am I missing?
PS: I don't want to use setGrabbed(true) because I already have an entire API for handling the mouse.