OpenSceneGraph Forum Forum Index OpenSceneGraph Forum
Official forum which mirrors the existent OSG mailing lists. Messages posted here are forwarded to the mailing list and vice versa.
 
   FAQFAQ    SearchSearch    MemberlistMemberlist    RulesRules    UsergroupsUsergroups    RegisterRegister 
 Mail2Forum SettingsMail2Forum Settings  ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 
   AlbumAlbum  OpenSceneGraph IRC ChatOpenSceneGraph IRC Chat   SmartFeedSmartFeed 

OSX X11 Build System Failures


 
Post new topic   Reply to topic    OpenSceneGraph Forum Forum Index -> Build system [build]
View previous topic :: View next topic  
Author Message
ravidavi
User


Joined: 06 Nov 2015
Posts: 34

PostPosted: Thu Jun 23, 2016 8:43 pm    Post subject:
OSX X11 Build System Failures
Reply with quote

Hi all,

A few of the newer OSG components explicitly reference osgViewer::GraphicsWindowCocoa in their code. This causes link errors when compiling OSG on MacOS with OSG_WINDOWING_SYSTEM set to X11.

The affected components are: avfoundation (osgdb), osgmultitouch (examples), osgoscdevice (examples). Currently the only check done in their CMake scripts is IF(APPLE), which implicitly assumes that everyone on Mac is building Cocoa.

One simple fix is to add a check at the beginning of the affected components' CMakeLists.txt files. e.g.:
Code:

IF(NOT (OSG_WINDOWING_SYSTEM STREQUAL "Cocoa"))
  RETURN()
ENDIF()

This will only build that component if the windowing system is Cocoa.

I see this build problem with the 3.4.0 stable download, as well as the latest Git source.

Thoughts appreciated,
Ravi
Back to top
View user's profile Send private message
ravidavi
User


Joined: 06 Nov 2015
Posts: 34

PostPosted: Thu Jun 23, 2016 9:02 pm    Post subject:
Reply with quote

Oops the fix I posted is wrong. osgmultitouch and osgoscdevice should continue to work on non-Apple platforms.

Any ideas on a good fix?

Ravi
Back to top
View user's profile Send private message
ravidavi
User


Joined: 06 Nov 2015
Posts: 34

PostPosted: Fri Jun 24, 2016 7:58 pm    Post subject:
Reply with quote

OK, looks like the fix could be

Code:

IF(APPLE AND NOT (OSG_WINDOWING_SYSTEM STREQUAL "Cocoa"))
  RETURN()
ENDIF()


This applies to avfoundation (which only compiles on OSX anyway), as well as osgmultitouch and osgoscdevice examples, which will continue to compile on non-apple platforms as before.

At least this will allow everything to compile on OSX/X11 until someone gets around to modifying actual source code for OSX/X11 compatibility.

Robert if you want, I can send the appropriate CMakeLists.txt files to submissions.
Back to top
View user's profile Send private message
ravidavi
User


Joined: 06 Nov 2015
Posts: 34

PostPosted: Thu Jul 21, 2016 5:56 am    Post subject:
Reply with quote

Fix submitted in Submissions Post.
Back to top
View user's profile Send private message
ravidavi
User


Joined: 06 Nov 2015
Posts: 34

PostPosted: Fri Jul 29, 2016 6:26 am    Post subject:
Reply with quote

Hi all,

I realized that the OpenGL link dependencies for OSG are not quite correct for OSX/X11. Specifically, if OSG_WINDOWING_SYSTEM is X11 then osgViewer is built with X11/OpenGL, but osg (base) is still built with Cocoa/OpenGL. This mismatch of OpenGL implementations can cause very unexpected runtime errors for 3rd-party apps that use OSG on OSX/X11.

An example of this happens when running "osgviewer cow.osg" with an OSX/X11 build; the viewer starts in fullscreen. As things are now, if you press "f", it goes into windowed mode but the window is black. With the proposed change, everything works as expected.

My proposed change is to move the OSX/X11-specific OpenGL link code from osgViewer/CMakeLists.txt to the root CMakeLists.txt. I've done this, and am testing it out now. I'll post the git patch to osg-submissions soon.

Ravi
Back to top
View user's profile Send private message
ravidavi
User


Joined: 06 Nov 2015
Posts: 34

PostPosted: Tue Aug 02, 2016 2:55 am    Post subject:
Reply with quote

Fix submitted in Submissions Post.
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    OpenSceneGraph Forum Forum Index -> Build system [build] All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You cannot download files in this forum

Similar Topics
Topic Author Forum Replies Posted
No new posts How to improve system performance white_water125 General 0 Tue Oct 17, 2017 6:43 am View latest post
No new posts Render point cloud in a different coo... Bruno Oliveira General 1 Mon Jun 05, 2017 1:50 pm View latest post
No new posts change default coordinate system unit vinothrajendran4 General 1 Wed May 31, 2017 5:03 am View latest post
No new posts osg plugin couldn't load an osgb or i... first_gle General 2 Sat May 27, 2017 3:52 am View latest post
No new posts osg Coordinate system shayne.tueller General 5 Fri Apr 28, 2017 11:54 am View latest post


Board Security Anti Bot Question MOD - phpBB MOD against Spam Bots
Powered by phpBB © 2001, 2005 phpBB Group
Protected by Anti-Spam ACP