summaryrefslogtreecommitdiff
path: root/demo
diff options
context:
space:
mode:
Diffstat (limited to 'demo')
-rw-r--r--demo/SpatialShader.lua6
-rw-r--r--demo/main.lua4
2 files changed, 5 insertions, 5 deletions
diff --git a/demo/SpatialShader.lua b/demo/SpatialShader.lua
index 699cff2..0c65176 100644
--- a/demo/SpatialShader.lua
+++ b/demo/SpatialShader.lua
@@ -74,10 +74,10 @@ SpatialShader.prototype.setCamera = function(self, camera)
self.shader:setMat4('projection', camera.projection)
end
-SpatialShader.prototype.drawMesh = function(self, mesh)
- self.shader:setMat4('model', mesh.transform)
+SpatialShader.prototype.drawMesh = function(self, meshInstance)
+ self.shader:setMat4('model', meshInstance.transform)
self.albedo:use(0)
- honey.mesh.draw(mesh.mesh, self.shader)
+ meshInstance.mesh:draw(self.shader)
end
-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
diff --git a/demo/main.lua b/demo/main.lua
index 5b19166..8e8d3d3 100644
--- a/demo/main.lua
+++ b/demo/main.lua
@@ -20,7 +20,7 @@ local lightDirection = honey.glm.vec3{1,1,1}
lightDirection:normalize()
shader:setVec3('directional_lights[0].direction', lightDirection)
shader:setVec3('directional_lights[0].color', honey.glm.vec3{0,1,0})
-local meshes = honey.mesh.load('Suzanne.obj')
+local meshes = honey.mesh('Suzanne.obj')
local suzanne = MeshInstance.new(sceneRoot,
honey.glm.vec3{0,0,3},
honey.glm.vec3{0,math.pi,0},
@@ -41,7 +41,7 @@ local plane2 = MeshInstance.new(suzanne,
shader)
suzanne.update = function(self, dt)
- self:rotate('y', 10*dt)
+ self:rotate('y', dt)
end
local total_frames = 0