/tutorial/vision/opengl/NeHe/lesson02/triangle.e
Specman e | 25 lines | 20 code | 5 blank | 0 comment | 0 complexity | 1e568fbe16b77abf0840e039055fe9ca MD5 | raw file
1class TRIANGLE 2 3inherit 4 GL_OBJECT 5 redefine draw 6 end 7 8creation 9 make_with_position 10 11feature{ANY} 12 build is 13 do 14 end 15 16 draw is 17 do 18 smart_gl.begin_triangles 19 smart_gl.vertex(0, 1, 0) 20 smart_gl.vertex(-1, -1, 0) 21 smart_gl.vertex(1, -1, 0) 22 smart_gl.end_primitive 23 end 24 25end