Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

OSG_WINDOWING_SYSTEM=X11 does not prevent use of OpenGL Framework #936

Open
RiotNrrrd opened this issue Mar 26, 2020 · 4 comments
Open

OSG_WINDOWING_SYSTEM=X11 does not prevent use of OpenGL Framework #936

RiotNrrrd opened this issue Mar 26, 2020 · 4 comments

Comments

@RiotNrrrd
Copy link

I have OpenSceneGraph built for 64-bit RHEL 7.x (X11) and was asked to build it on macOS Mojave - also as an X11 app. (Our Mac is headless, so building it natively as a Cocoa app is useless to us.)

A primary use we have for OSG is with Inventor files; I had previously built Coin and using COINDIR, CMake finds it and enables the Inventor plug-in. But my Coin installation uses the X11 libGL/libGLU versions, not the OpenGL Framework versions.

I thought I could solve this by setting OSG_WINDOWING_SYSTEM=X11 in CMakeCache.txt. While that does generate the correct <GL/gl.h> include path, it still generates OpenGL.framework references so when it goes to link shared library ../../lib/libosgViewer.dylib, it gets a bunch of Undefined symbols because it's not looking for /opt/X11/lib/libGL.dylib.

If I hand-edit CMakeCache.txt and replace the framework references (OPENGL_gl_LIBRARY, OPENGL_glu_LIBRARY et al.) with links to the X11 versions, make notices that the file has changed - so it goes and re-does the CMake first before it starts building, which of course wipes out my changes. :-/

I see in src/README.md that X11 support is "no longer actively supported". Am I hosed?

@openscenegraph
Copy link
Owner

openscenegraph commented Mar 26, 2020 via email

@RiotNrrrd
Copy link
Author

Thanks for the quick response. I'll go look up that osg-users Google Group. As for

Why not rebuild Coin to work with OpenGL Framework?

Because our use of it is on a headless Mac mini. We are primarily a Linux shop with an 'experimental' Mac port of our image processing suite. So everything is built for X11.

@openscenegraph
Copy link
Owner

openscenegraph commented Mar 26, 2020 via email

@RiotNrrrd
Copy link
Author

Could you not install linux on the Mac mini ;-)

Haha :-)

Another route would be to convert all your Inventor files to a modern
alternative, or or just native OSG. Or write a Inventor reader that isn't
dependent on Coin. All more work but might release you from an orphaned
project that is constraining things.

Unfortunately I'm not the developer so I can't speak for him. I will tell him (after I wake up) what the situation is, i.e. that OpenSceneGraph on the Mac is really meant for local, Cocoa/OpenGL-based display.

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants