summaryrefslogtreecommitdiff
path: root/demo/honey.lua
diff options
context:
space:
mode:
authorsanine <sanine.not@pm.me>2022-09-27 17:00:46 -0500
committersanine <sanine.not@pm.me>2022-09-27 17:00:46 -0500
commitd822cf5b786776788cace9c3f9b2be9df41812e9 (patch)
treea1afdd5894495b2ac89cf4f45d5fa26bfa2ca3f3 /demo/honey.lua
parent0745aeb35bee22f52b812869cf77995ff1ba373b (diff)
fix uninitialized memory bug in mesh loading and add suzanne.dae
Diffstat (limited to 'demo/honey.lua')
-rw-r--r--demo/honey.lua10
1 files changed, 9 insertions, 1 deletions
diff --git a/demo/honey.lua b/demo/honey.lua
index f7b4392..28cd987 100644
--- a/demo/honey.lua
+++ b/demo/honey.lua
@@ -87,7 +87,7 @@ gl.DeleteShader(vertexShader)
gl.DeleteShader(fragmentShader)
---====== set up vertex data ======--
+--====== set up mesh data manually ======--
local vertices = {
-- positions colors uvs
@@ -127,6 +127,14 @@ gl.VertexAttribPointer(2, 2, false, 8, 6)
gl.EnableVertexAttribArray(2)
+--===== load mesh from file =====--
+
+local scene = honey.import.importFile('suzanne.dae')
+print(#scene.meshes)
+local suzanne = {}
+suzanne.vertexData = {}
+
+
--====== load texture ======--
local texture = gl.GenTextures()