My experience with Mac development has not quite so smooth. Getting cmake to build was a battle and beyond the scope of this thread. OSG itself has some appearant rough edges with OSG and X11 integration. I am working with OpenSceneGraph-2.6.0, so I'm lagging a bit behind the most recent developments.

I needed to add a few lines from a "future" version of CMakeLists.txt to find some X11 include files in order to build examples/osgviewerQT...


IF(APPLE)
    FIND_LIBRARY(CARBON_LIBRARY Carbon)
    FIND_LIBRARY(COCOA_LIBRARY Cocoa)

# Added these...
    # X11 on Apple requires X11 library (but not OpenGL linking hack) on Leopard
    # Find GL/glx.h
    IF(EXISTS ${CMAKE_OSX_SYSROOT}/usr/X11/include/GL/glx.h)
        SET(OPENGL_INCLUDE_DIR /usr/X11/include)
    ELSEIF(EXISTS ${CMAKE_OSX_SYSROOT}/usr/X11R6/include/GL/glx.h)
        SET(OPENGL_INCLUDE_DIR /usr/X11R6/include)
    ENDIF(EXISTS ${CMAKE_OSX_SYSROOT}/usr/X11/include/GL/glx.h)
# ...done.

ENDIF(APPLE)


Another problem that took me a while to run down is a result of the screwy DISPLAY variable on MAC which is typically something like "/tmp/launch-pDgQFH/:0". This confounds GraphicsContext::ScreenIdentifier which ultimately sets screenNum to -1 causing a failure later on. The demo examples/osgthirdpersonview cow.osg exhibits this behavior.

A proble I have yet to run down is a "BadWindow (invalid Window parameter) error with the demo examples/osgviewerQT with runh with "cow.osg --QOSGWidget".

My Mac is running OS X 10.5.2 and Xquartz 2.2.3 w/ NVIDEA GeForce 7300 GT.


-Don

=0=0=0=0=0=0=0=0=0=0=0=0=0=0=0=0=0=0=0=0=0=0=0=0=0=0=0=0=0=0=0=

Donald Leich                      Mailto:[EMAIL PROTECTED]
Senior Software Developer         Voice: 201-460-4700 ext: 215
Intelligent Light                 FAX:   201-460-0221
301 Route 17 North, 7th Floor
Rutherford, NJ  07070-2575

Visit our web site at http://www.ilight.com
=0=0=0=0=0=0=0=0=0=0=0=0=0=0=0=0=0=0=0=0=0=0=0=0=0=0=0=0=0=0=0=

> Subject:
> Re: [osg-users] MAC
> From:
> Gerrick Bivins <[EMAIL PROTECTED]>
> Date:
> Tue, 18 Nov 2008 08:28:26 -0600
> To:
> OpenSceneGraph Users <[email protected]>, "Wasileski,
> Bryan J." <[EMAIL PROTECTED]>
>
> Hi Bryan,
> I've been using OSG on Mac for the past year or so and have had no
> troubles (except when Apple switched from 10.4 to 10.5 but that was on
> Apple not OSG!).
> I use cmake to generate Makefiles (linux style) and build from the
> command line w/o problems. There is also support for Xcode as well ,but
> I am unfamiliar with that route.
> Gerrick
>
>
> On 11/18/08 8:23 AM, "Wasileski, Bryan J." <[EMAIL PROTECTED]> wrote:
>
>     Hi,
>
>     I've not monitored the group mail for a while and was wondering if
> anyone could give me some user/developer experiences of OSG with the Mac.
>
>     Thanks.
>
>
>     Bryan
>     [EMAIL PROTECTED]
>
>

_______________________________________________
osg-users mailing list
[email protected]
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

Reply via email to