now it is working with glfw