Part of the Khronos Group
OpenGL.org

The Industry's Foundation for High Performance Graphics

from games to virtual reality, mobile phones to supercomputers

Results 1 to 4 of 4

Thread: glutMouseFunc on mac os x?

  1. #1
    Junior Member Newbie
    Join Date
    May 2003
    Location
    Tuebingen, Germany
    Posts
    2

    glutMouseFunc on mac os x?

    Hey all,
    I have ported some code from win32 to mac os x using glut. The only problem left is a 2button mouse. glutGetDevice(GLUT_NUM_MOUSE_BUTTONS) gets the right number of buttons, but glutMouseFunc doesnīt do anything. The keyboard functions both work fine, the mouse works at least with windows, so the mouse callback seems to be okay (in principle).
    Am I missing something about using mouses on the mac, an USE_THE_MOUSE_NOW-flag maybe?

    thanks
    Elin

  2. #2
    Junior Member Newbie
    Join Date
    Jul 2002
    Posts
    3

    Re: glutMouseFunc on mac os x?

    I have had success with GLUT and glutMouseFunc() on Mac OS X 10.1 and 10.2. Although, most of my OpenGL experience with OS X has been using Cocoa as the main event handler.

    What does the callback function look like or what is it doing?

    But to answer your question, there are not any additional flags you need to issue to make glutMouseFunc work correctly with Mac OS X.

  3. #3
    Advanced Member Frequent Contributor
    Join Date
    Dec 2001
    Location
    Wellington, New Zealand
    Posts
    548

    Re: glutMouseFunc on mac os x?

    Make sure you have the latest version of GLUT (Upgrade to 10.2.6 if you haven't; if you have, download it from developer.apple.com and build it yourself).

    I believe there were issues with the recognition of the right button in a particular version of GLUT.

    Does ctrl-clicking work?

  4. #4
    Junior Member Newbie
    Join Date
    May 2003
    Location
    Tuebingen, Germany
    Posts
    2

    Re: glutMouseFunc on mac os x?

    Hi,
    thanks for your remarks.
    The GLUT-version used is the newest, as far as I can see. It seems that GLUT is updated with the system, and the system is 10.2.6.
    As the mac for which Iīm doing all this isnīt mine (and I cannot get another one for testing right now), I donīt know about itīs ctrl-click behaviour. But I will try asap.
    I used now a workaround by defining the leftclick by clicking on the left side of the screen and vice versa. It isnīt beautiful, but works..
    thanks again!
    Elin

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •