glutMouseFunc handler button arg
Brought to you by:
mcfletch
A handler defined on a modified version of the
"simple" demo:
def on_mouse(self, button, state, x, y):
print (button, state, x, y)
when used via glutMouseFunc(self.on_mouse) the button
arg is always 0, the others are what is expected.
That is, I get output like:
(0, 0, 198, 203)
(0, 1, 114, 262)
(0, 0, 137, 43)
(0, 1, 207, 105)
(0, 0, 168, 30)
(0, 1, 162, 240)
(0, 0, 263, 220)
(0, 1, 87, 130)
(0, 0, 149, 230)
(0, 1, 157, 88)
I'm new to GL, so my apologies if I'm missing an
additional initialisation or handler step.
Logged In: YES
user_id=21784
Try out this test script. Works on my system. If it
doesn't work on your system upload PyOpenGL_info.html
produced by OpenGL/scripts/info.py
Logged In: YES
user_id=6405
That test script didn't work - PyOpenGL_info.html attached.
Logged In: YES
user_id=21784
Tested on Win32 and Linux (RedHat). Works fine. The
C code used to interface to glutMouseFunc and the
callback is trivial, i.e. just passes the arguments
straight through.
Try this C program so we can determine if its' a
PyOpenGL problem. This will probably work to compile
gcc -o test test.c -lglut -lGL -lGLU
Logged In: YES
user_id=6405
*sigh*
Sorry, my mistake.
Logged In: YES
user_id=21784
no prob