diff options
author | sanine-a <sanine.not@pm.me> | 2020-12-15 21:08:36 -0600 |
---|---|---|
committer | sanine-a <sanine.not@pm.me> | 2020-12-15 21:08:36 -0600 |
commit | 71dc88f9379f379ee0287b1ef2b62c57c6445099 (patch) | |
tree | fbc6288035740738f2c732b996e3f68830f13cf2 /demo | |
parent | 8f823ac7fc578e85415824220db3e06e01de0437 (diff) |
fix bugs in texture parameter setting and add low-resolution to demo
Diffstat (limited to 'demo')
-rw-r--r-- | demo/lowres.png | bin | 0 -> 210 bytes | |||
-rw-r--r-- | demo/main.lua | 34 |
2 files changed, 21 insertions, 13 deletions
diff --git a/demo/lowres.png b/demo/lowres.png Binary files differnew file mode 100644 index 0000000..25abad2 --- /dev/null +++ b/demo/lowres.png 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) |