andykorth / Pencil.Gaming

An open-source, cross-platform gaming library for C# with bindings for OpenGL, OpenAL, and GLFW.
137 stars 35 forks source link

glfwCreateCursor functionallity #42

Open zion-reload opened 8 years ago

zion-reload commented 8 years ago

Hi,

First of all, I wanna to thank you for porting GLFW3 to c#, I'm making an small application and is just great to work with the library :+1:

Unfortunately I can't create my own cursor.. I found the functions Set/GetWindowUserIcon, however, I can't find the glfwCreateCursor. As far as I could read out there the functionality is available on GLFW3 http://www.glfw.org/docs/latest/group__input.html#gafca356935e10135016aa49ffa464c355

can you please give me and example of how to archive this on pencil.game library? thanks in advance!!

zion-reload commented 8 years ago

is there any reason to do not comment to my previous question? if it is out of place, even that will be nice to know ;-)

andykorth commented 8 years ago

Hi, sorry I missed the question! I suspect that the reason that both glfwCreateCursor and glfwSetWindowIcon are missing is because they use GLFWimage isn't present in Pencil for GLFW3. It looks like it's a 32-bit per pixel bitmap. GLFW 3 doesn't provide any image loading, but pencil can, of course... so if you make a matching struct, you could probably write a and use a glfwCreateCursor.

A little more info here: http://www.glfw.org/docs/latest/input_guide.html#cursor_custom

antonijn commented 7 years ago

This issue will (probably) be fixed with a fix of #40

antonijn commented 7 years ago

I added the code for this, but I haven't tested it yet. It's in the develop branch.