summaryrefslogtreecommitdiff
path: root/demo/main.lua
diff options
context:
space:
mode:
authorsanine-a <sanine.not@pm.me>2020-12-15 21:08:36 -0600
committersanine-a <sanine.not@pm.me>2020-12-15 21:08:36 -0600
commit71dc88f9379f379ee0287b1ef2b62c57c6445099 (patch)
treefbc6288035740738f2c732b996e3f68830f13cf2 /demo/main.lua
parent8f823ac7fc578e85415824220db3e06e01de0437 (diff)
fix bugs in texture parameter setting and add low-resolution to demo
Diffstat (limited to 'demo/main.lua')
-rw-r--r--demo/main.lua34
1 files changed, 21 insertions, 13 deletions
diff --git a/demo/main.lua b/demo/main.lua
index b956d04..34f9e6f 100644
--- a/demo/main.lua
+++ b/demo/main.lua
@@ -11,7 +11,7 @@ honey.input.key.bind(honey.input.key.escape, honey.exit)
local buffer = false
honey.input.key.bind(honey.input.key.f, function(action) if action == 1 then buffer = not buffer end end)
-local tex = honey.texture.load('checkerboard.png')
+ local tex = honey.texture.load('lowres.png', {minFilter='nearest', magFilter='nearest'})
local sceneRoot = Node.new()
@@ -28,18 +28,26 @@ local suzanne = MeshInstance.new(sceneRoot,
meshes[1],
shader)
print(suzanne.mesh)
-local plane = MeshInstance.new(suzanne,
- honey.glm.vec3{1,0,0},
- honey.glm.vec3{0,0,0},
- honey.glm.vec3{1,1,1},
- Primitives.plane(4,4),
- shader)
--- local plane2 = MeshInstance.new(suzanne,
--- honey.glm.vec3{5,0,0},
--- honey.glm.vec3{0,math.pi,0},
--- honey.glm.vec3{1,1,1},
--- honey.primitives.plane(4,4),
--- shader)
+--local plane = MeshInstance.new(suzanne,
+-- honey.glm.vec3{1,0,0},
+-- honey.glm.vec3{0,0,0},
+-- honey.glm.vec3{1,1,1},
+-- Primitives.plane(4,4),
+-- shader)
+
+MeshInstance.new(sceneRoot,
+ honey.glm.vec3{0,0,3},
+ honey.glm.vec3{0,0,0},
+ honey.glm.vec3{1,1,1},
+ Primitives.plane(4,4),
+ shader)
+
+MeshInstance.new(sceneRoot,
+ honey.glm.vec3{4,0,3},
+ honey.glm.vec3{0,math.pi,0},
+ honey.glm.vec3{1,1,1},
+ Primitives.plane(4,4),
+ shader)
suzanne.update = function(self, dt)
self:rotate('y', dt)