local glfw = honey.glfw local gl = honey.gl local err = glfw.Init() if err ~= glfw.TRUE then local err, desc = glfw.GetError() error("failed to initialize glfw: " .. tostring(err)) end local window = glfw.CreateWindow(640, 480, "Hello world c:", glfw.monitor_NULL, glfw.window_NULL) glfw.SetJoystickCallback(function(jid, event) print(jid, event) end) glfw.MakeContextCurrent(window) gl.InitGlad() while (glfw.WindowShouldClose(window) == glfw.FALSE) do honey.gl.Clear(honey.gl.COLOR_BUFFER_BIT) glfw.SwapBuffers(window) glfw.PollEvents() end glfw.Terminate()