summaryrefslogtreecommitdiff
path: root/main.lua
diff options
context:
space:
mode:
Diffstat (limited to 'main.lua')
-rw-r--r--main.lua12
1 files changed, 11 insertions, 1 deletions
diff --git a/main.lua b/main.lua
index 0f46f70..ff746c7 100644
--- a/main.lua
+++ b/main.lua
@@ -65,6 +65,7 @@ function setupEntities()
entities:addComponents(camera, {
camera={
projection=Mat4():perspective(math.rad(45), 640/480, 0.1, 100),
+ render="screen",
},
transform={
matrix=Mat4():identity():translate(Vec3{0, 0, -6}),
@@ -126,13 +127,22 @@ function setupEntities()
entities:addComponents(id2, {
renderMesh = {
shader = { vertex="vertex.glsl", fragment="fragment.glsl" },
- mesh = { filename="assets/tetrahedron.obj", index=1 },
+ --mesh = { filename="assets/tetrahedron.obj", index=1 },
+ mesh = { filename="builtin.quad", index=1 },
},
transform = {
parent=id,
matrix=Mat4():identity():translate(Vec3{0, 2, 0}),
},
})
+
+ local quad = entities:createEntity()
+ entities:addComponents(quad, {
+ renderQuad = {
+ shader = { vertex="vertex.glsl", fragment="fragment.glsl" },
+ textures = { ourTexture = { filename = "44d9a0ec1c18e6126a5e9d9d9317f5ac.png" } },
+ },
+ })
end
setupEntities()