From 89572c1648128456822cf2dda07b13e78cfc2813 Mon Sep 17 00:00:00 2001 From: sanine Date: Mon, 13 Mar 2023 02:42:16 -0500 Subject: render all shapes --- honey/init.lua | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) create mode 100644 honey/init.lua (limited to 'honey/init.lua') 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 -- cgit v1.2.1