Hi Mukund, The OSG encapsulates almost all OpenGL functionality so for most OSG apps there isn't any need at all to drop down to OpenGL. The OSG uses a very thin layer on top of the OpenGL, with naming conventions and granularity kept.
It is also possible to integrate the OSG into existing OpenGL applications which provide the context etc, and possible to integrate OpenGL functions in the form of callbacks or subclasses from osg::Drawable (for geometry) or osg::StateAttribute (for state). One has to take care though as the OSG uses a lazy state updating scheme to maximize performance by avoid dispatching unnecessary OpenGL calls, this scheme means that you need to inform the OSG of any state changes that you make in your code, and visa versa - any state changes in the OSG you'll need to insulate from your own OpenGL code. As for GLUT, it really should be consigned to history, I really really really wouldn't recommend anyone use it for anything beyond it's original design - very simple OpenGL 1.x era demos. You can integrate the OSG with GLUT, there is even an osgviewerGLUT example to show you how, but I still wouldn't recommend going this route, it just hold your application back. Robert. On Sat, Jan 22, 2011 at 6:29 PM, Mukund Keshav <osgfo...@tevs.eu> wrote: > Hello, > > im using OpenSceneGraph for the past 2 days. Well, i would be needing it > mostly for terrain rendering. > > i was wondering if i can use OSG with some low level gl functions? > > What i mean is, > > say im using OpenSceneGraph. Now i want to use some gl functions, can i use > both together. > > something like this: > > > > Code: > > /* Use gl functions, build the projection matrix */ > .. > .. > /* Now build the modelview matrix */ > .. > .. > /* Now i build some scene using OSG */ > .. > .. > > /* gl functions to render */ > .. > > > > > Can i use this approach. i would like to use the lower level flexibility + > the ease with higher level APIs. Is this possible? > > This is exactly like the question asked here: > > http://www.mail-archive.com/osg-users@lists.openscenegraph.org/msg12497.html > > > Thanks, > Mukund > > ------------------ > Read this topic online here: > http://forum.openscenegraph.org/viewtopic.php?p=35897#35897 > > > > > > _______________________________________________ > 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