PDA

View Full Version : glutMouseFunc on mac os x?



Elin
05-16-2003, 04:09 AM
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? http://www.opengl.org/discussion_boards/ubb/smile.gif

thanks
Elin

jaredsmith
05-20-2003, 09:18 AM
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.

OneSadCookie
05-20-2003, 11:46 AM
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?

Elin
05-23-2003, 05:27 AM
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