stoe/data/cube.lisp
Renaud Casenave-Péré 6b2c2df3bf Add some simple objects to be rendered
A cube and a triangle
Make use of the input system to move the camera.
2014-11-10 16:54:03 +09:00

65 lines
4.1 KiB
Common Lisp

(:name "cube"
:streams ((:program simple-shader
:vertex-buffer ((position :float 3
#(0.5 0.5 0.5
0.5 -0.5 0.5
-0.5 -0.5 0.5
-0.5 0.5 0.5
0.5 0.5 0.5
-0.5 0.5 0.5
-0.5 0.5 -0.5
0.5 0.5 -0.5
0.5 0.5 0.5
0.5 0.5 -0.5
0.5 -0.5 -0.5
0.5 -0.5 0.5
0.5 0.5 -0.5
-0.5 0.5 -0.5
-0.5 -0.5 -0.5
0.5 -0.5 -0.5
0.5 -0.5 0.5
0.5 -0.5 -0.5
-0.5 -0.5 -0.5
-0.5 -0.5 0.5
-0.5 0.5 0.5
-0.5 -0.5 0.5
-0.5 -0.5 -0.5
-0.5 0.5 -0.5))
(color :float 4
#(0.0 1.0 0.0 1.0
0.0 1.0 0.0 1.0
0.0 1.0 0.0 1.0
0.0 1.0 0.0 1.0
0.0 0.0 1.0 1.0
0.0 0.0 1.0 1.0
0.0 0.0 1.0 1.0
0.0 0.0 1.0 1.0
1.0 0.0 0.0 1.0
1.0 0.0 0.0 1.0
1.0 0.0 0.0 1.0
1.0 0.0 0.0 1.0
1.0 1.0 0.0 1.0
1.0 1.0 0.0 1.0
1.0 1.0 0.0 1.0
1.0 1.0 0.0 1.0
0.0 1.0 1.0 1.0
0.0 1.0 1.0 1.0
0.0 1.0 1.0 1.0
0.0 1.0 1.0 1.0
1.0 0.0 1.0 1.0
1.0 0.0 1.0 1.0
1.0 0.0 1.0 1.0
1.0 0.0 1.0 1.0)))
:index-buffer (:unsigned-short :triangles
#(0 1 2
2 3 0
4 5 6
6 7 4
8 9 10
10 11 8
12 13 14
14 15 12
16 17 18
18 19 16
20 21 22
22 23 20)))))