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

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

http://github.com/tybor/Liberty
Specman e | 42 lines | 33 code | 9 blank | 0 comment | 0 complexity | bcae137803e752f033c9f9103f741665 MD5 | raw file
 1class LESSON03
 2
 3inherit
 4	GRAPHIC
 5	
 6creation
 7	make
 8
 9feature{ANY}
10	
11	world : WORLD
12	triangle : TRIANGLE
13	square : SQUARE
14
15	make is
16		local
17			win: TOPLEVEL_WINDOW
18			exit : BUTTON
19		do
20			create win.default_create
21			win.set_title("Lesson 03")
22			win.set_background_color(white_color)
23			win.map
24
25			create world.make(win)
26			create triangle.make_with_position(-1.5, 0.0, -6.0)
27			world.add_opaque_object(triangle)
28			create square.make_with_position(1.5, 0, -6)
29			world.add_opaque_object(square)
30
31			create exit.with_label(win, U"Exit")
32			exit.when_left_clicked(agent finish_program)
33			win.when_close_requested(agent finish_program)
34
35			vision.start
36		end
37
38	finish_program is
39		do
40			vision.loop_stack.break
41		end
42end