![]() To do this I add the following lines to glutGetModifiers in macx_modifier.m: if(_glutModifierMask & NSCommandKeyMask)Īnd again added a respective definition in glut.h: #define GLUT_ACTIVE_COMMAND 8 While I was at it, I also added support for catching the command (aka apple, aka ⌘) key. (*_mouseFunc)(buttonID, GLUT_DOWN, x, y) Īnd add the following definitions in glut.h: #define GLUT_WHEEL_LEFT 5 To add horizontal scrolling I changed the scrollWheel function in GLUTView.m to this: - (void)scrollWheel: (NSEvent *)theEvent ![]() These patches only add support for vertical scrolling. To - (BOOL)validateMenuItem:(NSMenuItem *)menuItem I fixed this, I changed the line in GLUTApplication.m that looks like: - (BOOL)validateMenuItem:(id )menuItem Type 'id ' does not conform to the 'NSCopying' protocol ![]() Unfortunately I still got compilation errors on Mac OS X 10.7.5 with Xcode 4. I followed these instructions for building from source: grab the source from Apple and apply the 3 patches. This is great, because I was really getting tired of the X11 windows that freeGLUT uses. I recently found out about a patch for the GLUT framework on Mac OS X to provide support for mouse wheel scrolling.
0 Comments
Leave a Reply. |