Check your API version for GLUT, glutKeyboardUpFunc is only defined if
your GLUT API version is at least 13. Don't really have time this
evening to track down what version of GLUT that shows up in (or
FreeGLUT/OpenGLUT, which is probably what you're using on FC2).
from OpenGL import GLUT
if __api_version__ is < 13, then there's probably a problem with how the
GLUT module is getting built (assuming, of course, that Free/OpenGLUT
has that part of the GLUT API). This may require tweaking how the GLUT
#if statements divide up the .i file.
BTW, glutKeyboardUpFunc is definitely there with GLUT 3.7.6 on Win32
using PyOpenGL 2.0.1.09
BTW2, you may find my new set of links to Python 3D resources helpful
when writing your game engine (
http://www.vrplumber.com/py3d.py?category=game ). There are actually
quite a few engines around these days, though only one or two of them
are written directly in Python.
> Hi list, I'm having a silly problem: I cannot find glutKeyboardUpFunc.
> I've picked up an old project (python game engine), but I get an error
> when I try to run it, telling me that "global name
> 'glutKeyboardUpFunc' is not defined."
> A simple dir(OpenGL.GLUT) revealed that glutKeyboardUpFunc really
> isn't defined, it's not there at all (glutKeyboardFunc is, though).
> A search for "pyopengl glutkeyboardupfunc" yielded no useful results
> on google.
> I feel kind of stupid, what am I missing here?
> I'm using pyopengl 2.0.1.09 and python 2.3 on fedora core 2
> oh, BTW, if anyone is interested in working on a game engine in
> python, help is always welcome! (I've already got a wicked sound
> module based on my own port of FMOD)
Mike C. Fletcher
Designer, VR Plumber, Coder