FAQ

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

Search Discussions

  • Gary Herron at Feb 8, 2010 at 6:26 am

    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 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/
  • Craig Berry at Feb 8, 2010 at 6:45 am

    On Sun, Feb 7, 2010 at 22:26, Gary Herron 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
  • Gary Herron at Feb 8, 2010 at 4:02 pm

    Craig Berry wrote:
    On Sun, Feb 7, 2010 at 22:26, Gary Herron 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
  • Craig Berry at Feb 10, 2010 at 5:38 pm
    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
  • Gary Herron at Feb 10, 2010 at 6:33 pm

    Craig Berry wrote:
    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!
    :-)

    Gary Herron

Related Discussions

Discussion Navigation
viewthread | post
Discussion Overview
grouppython-list @
categoriespython
postedFeb 6, '10 at 4:55a
activeFeb 10, '10 at 6:33p
posts6
users2
websitepython.org

2 users in discussion

Gary Herron: 4 posts Craig Berry: 2 posts

People

Translate

site design / logo © 2022 Grokbase