은 내가 마우스 버튼 클릭을 듣고 glutMouseFunc를 사용하는 PyOpenGL 프로그램을 작성하고 실행할 수 오전 64 비트 파이썬 3.x 및 윈도우 7에 대한 here에서 PyOpenGL설치 한 :PyOpenGL 프로그램에서 FreeGLUT glutMouseWheelFunc를 사용하는 방법은 무엇입니까?
from OpenGL.GLUT import *
from OpenGL.GL import *
# Imagine the typical glut init functions here ...
glutMouseFunc(mouse)
이제 마우스의 스크롤 휠을 읽고 싶습니다. 나는 이것을 C++에서 FreeGLUT을 사용하여 수행했다. FreeGLUT은 glutMouseWheelFunc을 노출한다. 확인하고 볼 수 있습니다. freeglut32.vc9.dll 및 freeglut64.vc9.dll : C:\Program Files\Python32\Lib\site-packages\OpenGL\DLLS
.
File "c:\Program Files\Python32\lib\site-packages\OpenGL\GLUT\special.py", line 139, in __call__
self.wrappedOperation(cCallback, *args)
File "c:\Program Files\Python32\lib\site-packages\OpenGL\GLUT\special.py", line 107, in failFunction
typeName, 'glut%sFunc'%(typeName),
OpenGL.error.NullFunctionError: Undefined GLUT callback function MouseWheel, check for bool(glutMouseWheelFunc) before calling
그래서, 가 어떻게 FreeGLUT이 PyOpenGL에서 호출을 사용합니까 :이 오류와 함께
from OpenGL.GLUT import *
from OpenGL.GLUT.freeglut import *
from OpenGL.GL import *
# Imagine the typical glut init functions here ...
glutMouseFunc(mouse)
glutMouseWheelFunc(mouseWheel)
이 실패
나는에 위의 코드를 변경? 내가 뭘 잘못하고 있니?