2012-03-22 01:36:20 +08:00
|
|
|
/* -*-c++-*- OpenSceneGraph - Copyright (C) 1998-2009 Robert Osfield
|
2009-03-23 19:53:06 +08:00
|
|
|
*
|
2012-03-22 01:36:20 +08:00
|
|
|
* This library is open source and may be redistributed and/or modified under
|
|
|
|
* the terms of the OpenSceneGraph Public License (OSGPL) version 0.0 or
|
2009-03-23 19:53:06 +08:00
|
|
|
* (at your option) any later version. The full license is in LICENSE file
|
|
|
|
* included with this distribution, and on the openscenegraph.org website.
|
2012-03-22 01:36:20 +08:00
|
|
|
*
|
2009-03-23 19:53:06 +08:00
|
|
|
* This library is distributed in the hope that it will be useful,
|
|
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
2012-03-22 01:36:20 +08:00
|
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
2009-03-23 19:53:06 +08:00
|
|
|
* OpenSceneGraph Public License for more details.
|
|
|
|
*/
|
|
|
|
|
|
|
|
/**
|
|
|
|
* \brief Shader generator framework.
|
|
|
|
* \author Maciej Krol
|
|
|
|
*/
|
|
|
|
|
|
|
|
#ifndef OSGUTIL_SHADER_STATE_
|
|
|
|
#define OSGUTIL_SHADER_STATE_ 1
|
|
|
|
|
|
|
|
#include <osgUtil/Export>
|
|
|
|
#include <osg/NodeVisitor>
|
|
|
|
#include <osg/State>
|
|
|
|
|
|
|
|
namespace osgUtil
|
|
|
|
{
|
|
|
|
|
|
|
|
class OSGUTIL_EXPORT ShaderGenVisitor : public osg::NodeVisitor
|
|
|
|
{
|
|
|
|
public:
|
|
|
|
ShaderGenVisitor();
|
|
|
|
|
2018-03-14 16:22:45 +08:00
|
|
|
/// assign default uber program to specified StateSet - typically the root node of the scene graph or the view's Camera
|
|
|
|
void assignUberProgram(osg::StateSet *stateSet);
|
2009-03-23 19:53:06 +08:00
|
|
|
|
2018-03-14 16:22:45 +08:00
|
|
|
void apply(osg::Node& node);
|
2009-03-23 19:53:06 +08:00
|
|
|
|
2018-03-14 16:22:45 +08:00
|
|
|
void remapStateSet(osg::StateSet* stateSet);
|
2009-03-23 19:53:06 +08:00
|
|
|
|
|
|
|
protected:
|
|
|
|
};
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
#endif
|