blob: c3dda37155ecfa39b789ee3d337386a1fbf1b7ef (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
|
local glfw = honey.glfw
local gl = honey.gl
local window = require 'honey.window'
local hinit = {}
setmetatable(hinit, {__index=_G})
setfenv(1, hinit)
function init(width, height, title)
local width = width or 640
local height = height or 480
local title = title or "honey3d"
glfw.Init()
local window = honey.Window(width, height, title)
glfw.MakeContextCurrent(window.win)
gl.InitGlad()
return window
end
function terminate()
glfw.Terminate()
end
return hinit
|