If you don't build OSG with the "GL3_AVAILABLE" CMake flag, then OSG "supports" GL3 and GL4 functionality via a GL 2.1 context and the OpenGL extension interface.
Selecting the "GL3_AVAILABLE" flag allows you to open GL3/4 contexts. This functionality was added in the OSG 2.9.x series. To my knowledge, there has been little or no development of GL3/4 contexts since; that's why OSG still includes gl3.h instead of glcorearb.h. You might consider contributing an update. To my knowledge, the osgQt library was never tested with a GL3/4 context. There is an example osgsimplegl3 to test/demo an OpenGL 3.1 context. This example works fine on Windows last time I checked. The example source has some comments at the bottom of the file. There is a known issue with core profile contexts because core profile requires use of vertex array objects. As far as I know, OSG has no support for vertex array objects. This is a roadblock to using OSG/GL3 on OSX. Much of this has been discussed in the past, so I'd recommend searching the osg-users archives for additional information. On Thu, Jun 27, 2013 at 3:08 AM, Roger Floydman <roger.floyd...@gmail.com>wrote: > Hi, > > I'd heard lots of good things about OpenSceneGraph so decided to give it a > try. On the 'features' page it says "OpenGL 1.0 through to OpenGL 4.2, and > OpenGL ES 1.1 and 2.0 are supported" which is good as i wanted to use > 'modern GL techniques' > > I decided to build from source as i wanted to integrate with Qt and it > seems there's been some work related to this in the osgQt module which i > thought would be good to have. > > The problems started when i wanted to use a newer GL version. In CMake the > option was to used GL3 so i selected that and deselected all the other GL > options. When trying to build OSG it complained that gl3.h couldn't be > found. So i went on a hunt for that and found the file no longer exists. It > has been replaced by glcorearb.h. > > I made a work around to get passed that error but creating my own gl3.h > file and including the glcorearb.h file & defining GLCOREARB_PROTOTYPES 1 > > Later in the build though i come across another error as GL/gl.h is > included via osgQt/GraphicsWindowQt and this file cannot be mixed with > glcorearb.h > > Am i missing something here or is it a real pain to get GL3+ working with > OSG? How does OSG support OpenGL 4.2 (as mentioned on the website) if it > isn't in sync with the glcorearb.h file and is still looking for gl3.h? > > Any help much appreciated. > > Thanks, > > Roger > > ------------------ > Read this topic online here: > http://forum.openscenegraph.org/viewtopic.php?p=54943#54943 > > > > > > _______________________________________________ > osg-users mailing list > osg-users@lists.openscenegraph.org > http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org > -- Paul Martz Skew Matrix Software LLC
_______________________________________________ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org