17 #include <osg/StateAttribute>
19 #include <unordered_map>
56 static void bindAttributes(
const osg::GLExtensions * ext,
const osg::StateSet *ss,
int shader,
int contextID);
63 static bool getVPShaderVector(osg::StateSet *ss, osg::State& state,
unsigned int &shaderHash,
64 std::vector<unsigned int> &vertShaderVector, std::vector<unsigned int> &fragShaderVector,
bool skip_shadow_shaders =
false,
bool skip_multiview_shaders =
false);
67 static bool addDegenerateShadersIfNeeded(osg::StateSet *ss, osg::State& state,
68 std::vector<unsigned int> &vertShaderVector, std::vector<unsigned int> &fragShaderVector,
bool skip_shadow_shaders =
false);
70 static void restoreEverything(osg::State& state);
73 static void restoreOpenGLMode(
const osg::State& state,
int stateToSet);
76 static void restoreOpenGLStateAttribute(osg::State& state, osg::StateAttribute::Type type);
79 static void restoreOpenGLProgram(
const osg::State& state);
82 static void restoreOpenGLFBO(
const osg::State& state);
85 static void markAllTextureAttributesDirty(osg::State & state);
91 static void generateModelInstanceShaders(osg::Node *node,
const std::string& shaderName);
94 static unsigned getNumGPUTextureImageUnits();
98 static void clearCachedProgramsAndUniformLocations(
void);
Diagonal crossing liens.
Definition: DtTacticalGraphicUtilities.h:93
#define DT_DLL_VRVOSG
Definition: vrvOsg.h:23
std::unordered_map< unsigned int, CachedUniformData > UniformLocationMap
Definition: DtOsgShaderUtils.h:109
Contains makVrv::DtVirtualBaseClass class.
Miscellaneous shader utilities for osg.
Definition: DtOsgShaderUtils.h:36
static ShaderUniLocMap theShaderUniLocMap
used to cache the shader uniform locations to avoid glGetUniformLocation calls Saves somewhere betwee...
Definition: DtOsgShaderUtils.h:115
Contains DLL export macros.
std::unordered_map< int, UniformLocationMap > ShaderUniLocMap
Definition: DtOsgShaderUtils.h:110