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

/tutorial/vision/opengl/NeHe/lesson02/square.e

http://github.com/tybor/Liberty
Specman e | 27 lines | 21 code | 5 blank | 1 comment | 0 complexity | db704c1dc914d2f5e61f18b28db0c09b MD5 | raw file
 1class SQUARE
 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			-- Vertices must be given in counter-clockwise order
19			smart_gl.begin_quads
20			smart_gl.vertex(-1, 1, 0)
21			smart_gl.vertex(-1, -1, 0)
22			smart_gl.vertex(1, -1, 0)
23			smart_gl.vertex(1, 1, 0)
24			smart_gl.end_primitive
25		end
26		
27end