blob: 095069033bdb1320b8e4621daa1d57b9b4f25a89 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
|
local glfw = honey.glfw
local err = glfw.Init()
print(err, glfw.TRUE)
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:", nil, nil)
glfw.MakeContextCurrent(window)
while (glfw.WindowShouldClose(window) ~= glfw.FALSE) do
gl.Clear(gl.COLOR_BUFFER_BIT)
glfw.SwapBUffers(window)
glfw.PollEvents()
end
glfw.Terminate()
|