Class: Scene
Class Method Summary collapse
Methods included from DefaultScene
#display, #keyboard, #mouse, #reshape, #timer
Class Method Details
.display ⇒ Object
9 10 11 12 13 14 15 16 17 18 19 |
# File 'lib/scene.rb', line 9 def self.display initialize glutDisplayFunc(Proc.new { display_proxy }) glutTimerFunc(10, Proc.new { timer_proxy }, 0) glutKeyboardFunc(Proc.new { |key, x, y| keyboard_proxy(key, x, y) }) glutMouseFunc(Proc.new { |, state, x, y| instance.mouse(, state, x, y) }) glutReshapeFunc(Proc.new { |width, height| instance.reshape(width, height) }) glutMainLoop end |