PageRenderTime 3ms CodeModel.GetById 1ms app.highlight 1ms RepoModel.GetById 1ms app.codeStats 0ms

/tutorial/vision/opengl/NeHe/lesson03/triangle.e

http://github.com/tybor/Liberty
Specman e | 29 lines | 23 code | 5 blank | 1 comment | 0 complexity | bfb69872d54706b736c15ccbcb7d4ffa 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			-- In SMART_GL, all colors are given with 4 values (including alpha value)
19			smart_gl.begin_triangles
20			full_red.render
21			smart_gl.vertex(0, 1, 0)
22			full_green.render
23			smart_gl.vertex(-1, -1, 0)
24			full_blue.render
25			smart_gl.vertex(1, -1, 0)
26			smart_gl.end_primitive
27		end
28		
29end