Class: Scene

Inherits:
Object
  • Object
show all
Includes:
DefaultScene
Defined in:
lib/scene.rb

Class Method Summary collapse

Methods included from DefaultScene

#display, #keyboard, #mouse, #reshape, #timer

Class Method Details

.displayObject



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 { |button, state, x, y| instance.mouse(button, state, x, y) })
  glutReshapeFunc(Proc.new { |width, height| instance.reshape(width, height) })
  
  glutMainLoop
end