From: Gary Herron on
Craig Berry wrote:
> Is there any way to get mouse wheel events from glut in PyOpenGL?
>
>

Use Linux. (On Linux, Glut returns mouse wheel events as buttons 4 and
5), or use FreeGlut. On both Windows and Linux freeglut returns mouse
wheel events as buttons 4 and 5.

Gary Herron

From: Gary Herron on
Craig Berry wrote:
> Can someone please tell me if there's a way to do this, or answer
> definitively that there is no way? I have a design in progress that
> could really use mousewheel control, and I don't want to settle for
> Plan B until I know Plan A is impossible. :)
>
> On Fri, Feb 5, 2010 at 19:48, Craig Berry <cdberry(a)gmail.com> wrote:
>
>> Is there any way to get mouse wheel events from glut in PyOpenGL?
>>
>> --
>> Craig Berry - http://www.cine.net/~cberry/
>> "Lots of things in the universe don’t solve any problems, and
>> nevertheless exist." -- Sean Carroll
>>
>>
>
>
>
>

Didn't I answer this already?

GLUT on windows usually does not catch mousewheel events for me.
(Although it seems to me that is has worked sporadically over past years
and versions.) GLUT on Linux does catch wheel events nicely -- but
read on anyway...

Freeglut (which is open source) is an (almost) direct binary replacement
for GLUT, and it *does* catch mousewheel events. (On both Windows and
Linux.)

Is there a reason this answer is not satisfactory? If you're not
*forced* to use GLUT, use FREEGLUT and your problem is solved with no
additional work.

If you *are* forced to use GLUT, rebel. GLUT has not been maintained
for more than 10 years, is showing its age, and is licensed in such a
way that you can't modify it. Use FREEGLUT instead: see
http://freeglut.sourceforge.net/

From: Craig Berry on
On Sun, Feb 7, 2010 at 22:26, Gary Herron <gherron(a)islandtraining.com> wrote:

> Didn't I answer this already?

If you did, for whatever reason I didn't see it; I just rechecked my
inbox to be sure. Thanks for doing so again!

I assume, given the list we're on, that Freeglut can be used with
Python. I'll look into it. Thanks for the pointer!

--
Craig Berry - http://www.cine.net/~cberry/
"Lots of things in the universe don’t solve any problems, and
nevertheless exist." -- Sean Carroll
From: Gary Herron on
Craig Berry wrote:
> On Sun, Feb 7, 2010 at 22:26, Gary Herron <gherron(a)islandtraining.com> wrote:
>
>
>> Didn't I answer this already?
>>
>
> If you did, for whatever reason I didn't see it; I just rechecked my
> inbox to be sure. Thanks for doing so again!
>
> I assume, given the list we're on, that Freeglut can be used with
> Python. I'll look into it. Thanks for the pointer!
>
>
Yes, easily. PyOpenGL has bindings for all the procedures in
GLUT/FREEGLUT. Just tell PyOpenGL to use the freeglut library instead,
or even just copy freeglut (.dll or .so or whatever) over your existing
glut library (glut32.dll or whatever). It really can serve as a binary
drop in replacement.

Gary Herron

From: Craig Berry on
I'm happy to report that FreeGLUT solved my problem. I obtained the
Windows prepackaged binary distribution, pulled out freeglut.dll,
renamed it to glut32.dll, and replaced the existing glut32.dll in the
PyOpenGL installation directory tree with the new version. Mousewheel
events are now reported, and everything else seems to be working as
expected. Thanks for your help!

--
Craig Berry - http://www.cine.net/~cberry/
"Lots of things in the universe don’t solve any problems, and
nevertheless exist." -- Sean Carroll