LWJGL Forum

Programming => OpenGL => Topic started by: orange451 on July 20, 2018, 23:29:37

Title: Error creating standard cursor
Post by: orange451 on July 20, 2018, 23:29:37
Hello, I am trying to use the method GLFW#glfwCreateStandardCursor(Shape)

When running this code:
long value = GLFW.glfwCreateStandardCursor(GLFW.GLFW_CURSOR_NORMAL);

I am met with this error:
[LWJGL] GLFW_INVALID_ENUM error
Description : Invalid standard cursor 0x00034001
Stacktrace  :
org.lwjgl.glfw.GLFW.glfwCreateStandardCursor(GLFW.java:3459)
lwjgui.scene.Cursor.getCursor(Cursor.java:25)


It's not really too vital, as it's only a one-time error. Nothing breaks.
However the error only comes once. Calling the code again will not produce it.
Title: Re: Error creating standard cursor
Post by: spasi on July 21, 2018, 06:03:37
GLFW_CURSOR_NORMAL is not a valid argument, it is used in glfwSetInputMode only. You can find the supported cursor shapes here (http://www.glfw.org/docs/latest/group__shapes.html) or in the javadoc for glfwCreateStandardCursor.
Title: Re: Error creating standard cursor
Post by: orange451 on July 21, 2018, 23:41:38
Could you perhaps list them here? I am in china for the next month without a VPN, and most websites are blocked :P
Title: Re: Error creating standard cursor
Post by: spasi on July 22, 2018, 00:01:57
GLFW_ARROW_CURSOR
GLFW_IBEAM_CURSOR
GLFW_CROSSHAIR_CURSOR
GLFW_HAND_CURSOR
GLFW_HRESIZE_CURSOR
GLFW_VRESIZE_CURSOR
Title: Re: Error creating standard cursor
Post by: orange451 on July 22, 2018, 02:03:18
Oh I was looking for Arrow_Cursor, thanks @Spasi!