Browse Source

Add Cubemap example;

bjorn 7 years ago
parent
commit
e21ca4e17d

+ 16 - 0
examples/Cubemap/main.lua

@@ -0,0 +1,16 @@
+-- Texture from Humus (www.humus.name)
+
+function lovr.load()
+  cube = lovr.graphics.newTexture({
+    left = 'negx.jpg',
+    right = 'posx.jpg',
+    top = 'posy.jpg',
+    bottom = 'negy.jpg',
+    front = 'negz.jpg',
+    back = 'posz.jpg'
+  })
+end
+
+function lovr.draw()
+  lovr.graphics.skybox(cube)
+end

BIN
examples/Cubemap/negx.jpg


BIN
examples/Cubemap/negy.jpg


BIN
examples/Cubemap/negz.jpg


BIN
examples/Cubemap/posx.jpg


BIN
examples/Cubemap/posy.jpg


BIN
examples/Cubemap/posz.jpg