Added osg::Capability and Cabibilityi base classes to wrap up glEnable/glDisable + glEnablei/glDisablei functionality, with osg::Enablei and osg::Disablei concrete implementations.

git-svn-id: http://svn.openscenegraph.org/osg/OpenSceneGraph/trunk@14564 16af8721-9629-0410-8352-f15c8da7e697
This commit is contained in:
Robert Osfield
2014-12-03 17:31:16 +00:00
parent 457d41d385
commit 5efe60dcf5
5 changed files with 254 additions and 1 deletions

View File

@@ -25,6 +25,7 @@
#include <osg/TextureRectangle>
#include <osg/ColorMask>
#include <osg/Material>
#include <osg/Capability>
#include <osgGA/TrackballManipulator>
#include <osgGA/FlightManipulator>
@@ -354,6 +355,12 @@ osg::Node* createScene(osg::Node* cam_subgraph, unsigned int tex_width, unsigned
}
#if 0
// test for new glEnablei/glDisablei functionality.
camera->getOrCreateStateSet()->setAttribute(new osg::Enablei(GL_BLEND, 0));
camera->getOrCreateStateSet()->setAttribute(new osg::Disablei(GL_BLEND, 1));
#endif
// we can also read back any of the targets as an image, modify this image and push it back
if (useImage) {
// which texture to get the image from