Пример #1
0
 def glutDestroyMenu( cls, menu ):
     """Destroy (cleanup) the given menu
     
     Deregister's the interal pointer to the menu callback 
     
     returns None
     """
     result = simple.glutDestroyMenu( menu )
     contextdata.delValue( ('menucallback',menu) )
     return result
Пример #2
0
 def glutDestroyMenu( cls, menu ):
     """Destroy (cleanup) the given menu
     
     Deregister's the interal pointer to the menu callback 
     
     returns None
     """
     result = simple.glutDestroyMenu( menu )
     contextdata.delValue( ('menucallback',menu) )
     return result
Пример #3
0
 def glutCreateMenu( cls, func ):
     """Create a new (current) menu, return small integer identifier
     
     func( int ) -- Function taking a single integer reflecting
         the user's choice, the value passed to glutAddMenuEntry
     
     return menuID (small integer)
     """
     cCallback = cls.callbackType( func )
     menu = simple.glutCreateMenu( cCallback )
     contextdata.setValue( ('menucallback',menu), (cCallback,func) )
     return menu
Пример #4
0
 def glutCreateMenu( cls, func ):
     """Create a new (current) menu, return small integer identifier
     
     func( int ) -- Function taking a single integer reflecting
         the user's choice, the value passed to glutAddMenuEntry
     
     return menuID (small integer)
     """
     cCallback = cls.callbackType( func )
     menu = simple.glutCreateMenu( cCallback )
     contextdata.setValue( ('menucallback',menu), (cCallback,func) )
     return menu
Пример #5
0
	def fixed_glutCreateMenu(menu_func):
		"""replacement for broken glutCreateMenu"""
		print MENUFUNC
		menu = simple.glutCreateMenu(MENUFUNC(menu_func))
		return menu