diff options
author | sanine <sanine.not@pm.me> | 2023-02-23 00:04:50 -0600 |
---|---|---|
committer | sanine <sanine.not@pm.me> | 2023-02-23 00:04:50 -0600 |
commit | 7f7c3cea4e0bc564009089b1520303c29164d308 (patch) | |
tree | 9ca0c050611e4732e86ce75e0888671b30d9ff93 /demo/fancy | |
parent | 26af60e0e9dfc4ecdf6b1c6f9a2dc5818f4ad8d7 (diff) |
fix bug with byte alignment and update fancy demo to use refactored glm bindings
Diffstat (limited to 'demo/fancy')
-rw-r--r-- | demo/fancy/honey.lua | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/demo/fancy/honey.lua b/demo/fancy/honey.lua index bbc8445..5a93a0e 100644 --- a/demo/fancy/honey.lua +++ b/demo/fancy/honey.lua @@ -250,32 +250,32 @@ gl.Uniform1i(gl.GetUniformLocation(shader, 'ourTexture'), 0) --====== matrices ======-- -local model = honey.glm.mat4() -local axis1 = honey.glm.vec3() +local model = honey.glm.mat4_create() +local axis1 = honey.glm.vec3_create() honey.glm.vec3_set(axis1, 0, 1.0) honey.glm.vec3_set(axis1, 1, 0.0) honey.glm.vec3_set(axis1, 2, 0.0) -local axis2 = honey.glm.vec3() +local axis2 = honey.glm.vec3_create() honey.glm.vec3_set(axis2, 0, 0.0) honey.glm.vec3_set(axis2, 1, 1.0) honey.glm.vec3_set(axis2, 2, 0.0) -local view = honey.glm.mat4() +local view = honey.glm.mat4_create() honey.glm.mat4_identity(view) -local translation = honey.glm.vec3() +local translation = honey.glm.vec3_create() honey.glm.vec3_set(translation, 0, 0.0) honey.glm.vec3_set(translation, 1, 0.0) honey.glm.vec3_set(translation, 2, -3.0) honey.glm.translate(view, translation) -local projection = honey.glm.mat4() +local projection = honey.glm.mat4_create() honey.glm.perspective(math.rad(45), 800/600, 0.1, 100, projection) --====== main loop ======-- -local transform = honey.glm.mat4() +local transform = honey.glm.mat4_create() while not window.shouldClose(w) do local time = window.getTime() |