Deferred rendering is now the de-facto standard rendering technique in many modern game engines, hence I think it is important to have this technique demonstrated in an osg code example.
This particular sample adds soft shadows as well as bump mapping into the rendering pipeline. The image files whitemetal_diffuse.jpg and whitemetal_normal.jpg from OpenSceneGraph-Data images folder are required (The OSG_FILE_PATH environment variable must be set correctly)
Two additional osgt models are included with the demo (best to also put them into OpenSceneGraph-Data, I think.
The shaders are currently defined in separate .frag and .vert files.
implementations being registered at the same time.
One usage case for this functionality to support usage of Wayland and X11 in the same version of the osgViewer.
As part of the new functionality there is now a osg::GraphicsContext::Traits::windowingSystemPreferrence string
that default to empty, but if defined will ensure that a specific WindowingSystemInterface is utilized when
you do a generic call like osg::createGraphicsContext().
Also implemented is standard proxy object for registering the new contexts and removing them automatically, and
declaration of standard graphicswindow_name() C entry point to help with static build linking.
"From I think that this piece of code in StateSet::setTextureAttributeAndModes is a copy&paste mistake:
OSG_NOTICE<<"Warning: non texture attribute '"<<attribute->className()<<"' passed to setTextureAttributeAndModes(unit,attr,value), "<<std::endl;
OSG_NOTICE<<" assuming setAttributeAndModes(attr,value) instead."<<std::endl;
OSG_NOTICE<<" please change calling code to use appropriate call."<<std::endl;
setAttribute(attribute,value);
As per the warning message it should be calling setAttributeAndModes(attribute,value); ."
Font::getKerning(...), Font::getGlyph3D(...) doesn't ask for a font resolution so it uses the last font resolution requested by Font:: getGlyph(...).
This can leads to different results depending of the precedent call to Font::getGlyph(...).
See http://lists.openscenegraph.org/pipermail/osg-users-openscenegraph.org/2016-January/271952.html for more infos.
This fix adds a font resolution parameter to Font::getKerning(...), Font::getGlyph3D(...) and to the font implementations.
This was made under the base revision r15182."