17 #include <boost/unordered_map.hpp>
19 #include <osg/StateAttribute>
52 static void bindAttributes(
const osg::GLExtensions * ext,
const osg::StateSet *ss,
int shader,
int contextID);
59 static bool getVPShaderVector(osg::StateSet *ss, osg::State& state,
unsigned int &shaderHash,
60 std::vector<unsigned int> &vertShaderVector, std::vector<unsigned int> &fragShaderVector,
bool skip_shadow_shaders =
false);
63 static bool addDegenerateShadersIfNeeded(osg::StateSet *ss, osg::State& state,
64 std::vector<unsigned int> &vertShaderVector, std::vector<unsigned int> &fragShaderVector,
bool skip_shadow_shaders =
false);
66 static void restoreEverything(osg::State& state);
68 static void restoreOpenGLMode(osg::State& state,
int stateToSet);
69 static void restoreOpenGLStateAttribute(osg::State& state, osg::StateAttribute::Type type);
70 static void restoreOpenGLProgram(osg::State& state);
71 static void restoreOpenGLFBO(osg::State& state);
72 static void markAllTextureAttributesDirty(osg::State & state);
78 static void generateModelInstanceShaders(osg::Node *node,
const std::string& shaderName);
81 static unsigned getNumGPUTextureImageUnits();