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

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.

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?

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

This topic was automatically closed 183 days after the last reply. New replies are no longer allowed.