From d822cf5b786776788cace9c3f9b2be9df41812e9 Mon Sep 17 00:00:00 2001 From: sanine Date: Tue, 27 Sep 2022 17:00:46 -0500 Subject: fix uninitialized memory bug in mesh loading and add suzanne.dae --- demo/honey.lua | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) (limited to 'demo/honey.lua') 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() -- cgit v1.2.1