Re: [osg-users] Modifier key mask not working under OS X
Hi François, I don't have an Mac or OSX expertise to help with this particular issue, I'll have to defer to others with relevant systems and expertise. One thing I'd add is that it would checking to see how the osgkeyboard runs on your system, and also could you tell us whether you've built using Carbon or Cocoa? The later is now the preferred option. Resolution of this issue will have to be down to member of the OSG community that have OSX expertise, hopefully they will chime in with this thread. Robert. On 15 January 2013 14:53, François Génolini fgenol...@hotmail.com wrote: I have just checked out OpenSceneGraph trunk and built it on my mac. osgversion: OpenSceneGraph Library 3.1.4 uname -a: Darwin 12.2.0 Darwin Kernel Version 12.2.0: Sat Aug 25 00:48:52 PDT 2012; root:xnu-2050.18.24~1/RELEASE_X86_64 x86_64 XCode: Version 4.5.2 (4G2008a) I am trying to get some software working: chapter 2 example from the OpenSceneGraph 3 cookbook (http://www.packtpub.com/openscenegrap-3-for-advanced-3d-programming-using-api-cookbook/book). In this example, I cannot pick the sphere or the cube as long as the code expects to see modifierKeyMask osgGA::GUIEventAdapter::MODKEY_CTRL If I remove this condition (any left mouse click allows the method to continue), then the software works as designed. Neither Control (left / right) nor Alt modifiers (left / right) are reported. Shift (left / right) and Command (left / right) are reported. Key combinations (Shift + Control) are not reported (even though, on its own, Shift is reported). Here is a reference to an old discussion on the mailing list: [osg-users] Modifier key mask not working under OS X, by Adrian Egli OpenSceneGraph (3D) 3dhelp at gmail.com, dated Thu Feb 21 22:23:05 PST 2008 This is either a bug that was never fixed or a regression. What would be the way forward to address this? Regards, François Génolini ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] Modifier key mask not working under OS X
Hi, Configured CMake to target Xcode, cmake automatically selected OSG_WINDOWING_SYSTEM to be Cocoa and CMAKE_OSX_ARCHITECTURES is set to x86_64. This pretty much excludes legacy Carbon (although cmake does find CARBON_LIBRARY). OSG libs then built using the XCode GUI. Reading the various forums it looks like the OSX event handler combines CTRL+left-mouse-click at a low level and replaces it with right-mouse-click, a throwback of the traditional Apple single-button mouse. I have not yet read about the ALT+left-mouse-click combination, and why CTRL+SHIFT+left-mouse-click is not reported either. ... Thank you! Cheers, Francois -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=52079#52079 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
[osg-users] Modifier key mask not working under OS X
I have just checked out OpenSceneGraph trunk and built it on my mac.osgversion: OpenSceneGraph Library 3.1.4uname -a: Darwin 12.2.0 Darwin Kernel Version 12.2.0: Sat Aug 25 00:48:52 PDT 2012; root:xnu-2050.18.24~1/RELEASE_X86_64 x86_64XCode: Version 4.5.2 (4G2008a) I am trying to get some software working: chapter 2 example from the OpenSceneGraph 3 cookbook (http://www.packtpub.com/openscenegrap-3-for-advanced-3d-programming-using-api-cookbook/book).In this example, I cannot pick the sphere or the cube as long as the code expects to seemodifierKeyMask osgGA::GUIEventAdapter::MODKEY_CTRL If I remove this condition (any left mouse click allows the method to continue), then the software works as designed. Neither Control (left / right) nor Alt modifiers (left / right) are reported.Shift (left / right) and Command (left / right) are reported.Key combinations (Shift + Control) are not reported (even though, on its own, Shift is reported). Here is a reference to an old discussion on the mailing list:[osg-users] Modifier key mask not working under OS X, by Adrian Egli OpenSceneGraph (3D) 3dhelp at gmail.com, dated Thu Feb 21 22:23:05 PST 2008 This is either a bug that was never fixed or a regression. What would be the way forward to address this? Regards, François Génolini ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] Modifier key mask not working under OS X
Adrian Egli OpenSceneGraph (3D) schrieb: Perfect, it's working. ok, I'll submit them to osg-submissions. did you still a review of my AGL Thread Safe submission ? because i can not run the safari plugin with mutli threaded, only single thread. otherwise i crashs when i press 's' (stats, freetype) and then i rescale or move the safari window. Sorry, I did not get anything to review from you? Did you send me an email? I think it is the wrong solution to add mutexes to the GraphicsWindowCarbon. IMHO all window-implementations require calling from the right thread which created and manipulated the opengl context. All threading-stuff is done outside the GraphicWindow-implementations. Perhaps Robert can add some more info to this topic. Perhaps it's a better solution for your special needs to subclass from GraphicsWindowCarbon and add the Mutexes there. I could not recreate the crash using the standard osgviewer. cheers, Stephan ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] Modifier key mask not working under OS X
No alt, ctrl, key event /adegli 2008/2/21, Stephan Maximilian Huber [EMAIL PROTECTED]: Nils Hjelte schrieb: When reading the modifier key mask from GUIEventAdapter in my event handler it is always zero. And using example_osgkeyboard nothing happens when pressing a modifier key. I have tested under Linux as well and there it works as expected. can you test the attached files -- these changes should fix the missing mod-key-functionality. If everything is well on your end, we can submit the files to osg-submission. cheers, Stephan ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org -- Adrian Egli ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] Modifier key mask not working under OS X
Perfect, it's working. did you still a review of my AGL Thread Safe submission ? because i can not run the safari plugin with mutli threaded, only single thread. otherwise i crashs when i press 's' (stats, freetype) and then i rescale or move the safari window. After i added the protection of agl calls (ReentrantMutex) it was ok, or i tested i got never again a crash. so i don't really understand, why resizing implemented in the updateoperation (update) pass cause a crash while using freetype. (this is just a guess) /adegli 2008/2/21, Stephan Maximilian Huber [EMAIL PROTECTED]: Adrian Egli OpenSceneGraph (3D) schrieb: No alt, ctrl, key event grrr, I am sorry -- I attached a wrong version of GraphicsWindowCarbon (too much clutter on my desktop), please test again with the correct files. cheers, Stephan ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org -- Adrian Egli ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] Modifier key mask not working under OS X
Nils Hjelte schrieb: When reading the modifier key mask from GUIEventAdapter in my event handler it is always zero. And using example_osgkeyboard nothing happens when pressing a modifier key. I have tested under Linux as well and there it works as expected. it looks like that the modifier-key-support is broken for Mac OS X. There were some contributions merged and Robert commented them out again in a newer revision because of malfunction, don't know what the problem was. I am really busy right now, don't know when I have time to dive into the code. Stephan ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
[osg-users] Modifier key mask not working under OS X
Hi! When reading the modifier key mask from GUIEventAdapter in my event handler it is always zero. And using example_osgkeyboard nothing happens when pressing a modifier key. I have tested under Linux as well and there it works as expected. Tested on OSG revision 7859, using a Intel MacBook with OS X 10.5.2 // Nils ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org