Hi,

I'm trying to compile an application in Mac that requires OpenGL 3.2. The app 
starts but fails when compiling the shaders and seems that, by default, OSG 
3.0.1 compiles without OpenGL 3 support.

My next step was to recompile OSG with these settings:
/usr/bin/cmake -G Xcode -D OSG_COMPILE_FRAMEWORKS:BOOL=1 -D 
OSG_WINDOWING_SYSTEM:STRING=Cocoa -D OSG_BUILD_PLATFORM_IPHONE:BOOL=0 -D 
CMAKE_OSX_ARCHITECTURES:STRING=x86_64 -D 
OSG_DEFAULT_IMAGE_PLUGIN_FOR_OSX:STRING=imageio -D 
CMAKE_OSX_SYSROOT:STRING=/Developer/SDKs/MacOSX10.7.sdk -D 
OSG_GL3_AVAILABLE::BOOL=1  -D OSG_GL1_AVAILABLE::BOOL=0  -D 
OSG_GL2_AVAILABLE::BOOL=0 .

And seems that this time uses GL3 as it fails to compile with the error:
include/osg/GL:109:18: fatal error: 'GL3/gl3.h' file not found [2]

Then I add the missing includes to the path and I got a lot of errors:

/usr/include/GL3/gl3.h:85:9: warning: 'GL3_PROTOTYPES' macro redefined [2]
 #define GL3_PROTOTYPES
         ^
OpenSceneGraph/include/osg/GL:108:17: note: previous definition is here
         #define GL3_PROTOTYPES 1
                 ^
OpenSceneGraph/include/osg/GL:130:50: error: use of undeclared identifier 
'glLoadMatrixf'; did you mean 'glLoadMatrix'? [3]
     inline void glLoadMatrix(const float* mat) { 
glLoadMatrixf(static_cast<const GLfloat*>(mat)); }
                                                  ^~~~~~~~~~~~~
                                                  glLoadMatrix
fix-it:"OpenSceneGraph/include/osg/GL":{130:50-130:63}:"glLoadMatrix"
OpenSceneGraph/include/osg/GL:130:17: note: 'glLoadMatrix' declared here [3]
     inline void glLoadMatrix(const float* mat) { 
glLoadMatrixf(static_cast<const GLfloat*>(mat)); }
                 ^
OpenSceneGraph/include/osg/GL:131:50: error: use of undeclared identifier 
'glMultMatrixf'; did you mean 'glMultMatrix'? [3]
     inline void glMultMatrix(const float* mat) { 
glMultMatrixf(static_cast<const GLfloat*>(mat)); }
                                                  ^~~~~~~~~~~~~
                                                  glMultMatrix
… and more …

The question is now, can OpenGL 3.2 be use in Mac OS X? I'm doing something 
wrong?

Thanks a lot,

  David


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

Reply via email to