lib/gamnit depth: fix Plane drawing using indices for glDrawElements
authorAlexis Laferrière <alexis.laf@xymus.net>
Tue, 19 Jan 2016 14:08:24 +0000 (09:08 -0500)
committerAlexis Laferrière <alexis.laf@xymus.net>
Tue, 19 Jan 2016 19:08:39 +0000 (14:08 -0500)
Signed-off-by: Alexis Laferrière <alexis.laf@xymus.net>

lib/gamnit/depth/more_meshes.nit

index 9cbc830..1c6edf4 100644 (file)
@@ -57,6 +57,9 @@ class Plane
        end
 
        redef var center = new Point3d[Float](0.0, 0.0, 0.0) is lazy
+
+       init do indices.add_all([0, 1, 2, 2, 1, 3])
+       # TODO use gl_TRIANGLE_FAN instead
 end
 
 # Cube, with 6 faces