diff options
author | sanine <sanine.not@pm.me> | 2023-03-13 02:42:16 -0500 |
---|---|---|
committer | sanine <sanine.not@pm.me> | 2023-03-13 02:42:16 -0500 |
commit | 89572c1648128456822cf2dda07b13e78cfc2813 (patch) | |
tree | 78cafed06eb4cb261e53d0de28fa7e170ce55d6f /honey/init.lua | |
parent | bb8c38bffba86cda05e0e8e9b52fb68301286b53 (diff) |
render all shapes
Diffstat (limited to 'honey/init.lua')
-rw-r--r-- | honey/init.lua | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/honey/init.lua b/honey/init.lua new file mode 100644 index 0000000..c3dda37 --- /dev/null +++ b/honey/init.lua @@ -0,0 +1,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 |