HI David, The OSG is designed to check for extensions at runtime, so even if you compile the OSG against OpenGL 1.1 it will still be able to load up OpenGL 3.2 features at runtime and use them.
The CMake option to compile specifically against OpenGL 3 is for when you want to compile against OpenGL 3 without the backwards compatibility to OpenGL 2.x, this disables all the fixed function pipeline. This is something you might want, but it's mostly not necessary. Robert. On 1 March 2012 20:27, David Garcia <da...@aimsun.com> wrote: > > 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 > 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