Hey, I'm using GLFW on C# with Pencil.Gaming
My problem is that GetCursorPos only returns 0 (i and j).
My code:
static void Main(string[] args)
{
if (!Glfw.Init()) {
Console.WriteLine("ERROR");
return;
}
GlfwMonitorPtr monitor = Glfw.GetPrimaryMonitor();
GlfwWindowPtr window = Glfw.CreateWindow(1280, 720, "SharpFloat", GlfwMonitorPtr.Null, GlfwWindowPtr.Null);
Glfw.MakeContextCurrent(window);
int i;
int j;
while (!Glfw.WindowShouldClose(window)) {
GL.Clear(ClearBufferMask.ColorBufferBit);
Glfw.GetCursorPos(window, out i, out j);
Console.WriteLine(i + " " + j);
Glfw.SwapBuffers(window);
Glfw.PollEvents();
}
Glfw.Terminate();
}
Do I read it wrong? Or do I have to do something before I can read it?