22 #ifndef OSG_MATERIAL_MANAGER_SHADER_FUNC_H 23 #define OSG_MATERIAL_MANAGER_SHADER_FUNC_H 37 ShaderFunc(std::string
name, std::vector<std::string> args,
unsigned int priority=0) {
53 if (minVersion>this->minVersion)
65 std::vector< std::pair<std::string,std::string> >
getDeps()
const {
66 std::vector< std::pair<std::string,std::string> > v;
67 v.reserve(
deps.size());
68 v.insert(v.begin(),
deps.begin(),
deps.end());
123 std::set<GLSLAttribute>::const_iterator it =
mainVarDecs.begin();
161 virtual std::string
code()
const {
182 std::map<std::string,std::string>
deps;
const std::list< MainVar > & getMainVars() const
void addAttribute(GLSLAttribute att)
std::vector< GLSLExport > exports
std::set< GLSLConstant > constants
void addExport(GLSLExport e)
virtual std::string code() const
void addSuffix(GLSLSuffix suffix)
const std::set< std::string > & getDisabledExtensions() const
const std::set< GLSLSuffix > & getSuffixes() const
void addVarying(GLSLVarying varying)
const std::set< GLSLAttribute > & getAttributes() const
void addMainVar(GLSLVariable var, int priority=0)
std::vector< std::pair< std::string, std::string > > getDeps() const
const std::vector< PrioritizedLine > & getSnippets() const
std::map< std::string, std::string > deps
std::vector< PrioritizedLine > snippets
std::string generateFunctionCode()
const std::set< std::string > & getEnabledExtensions() const
std::list< MainVar > mainVars
void enableExtension(std::string extensionName)
const std::set< GLSLUniform > & getUniforms() const
void addUniform(GLSLUniform uniform)
std::set< std::string > disabledExtensions
void setMinVersion(int minVersion)
ShaderFunc(std::string name, std::vector< std::string > args, unsigned int priority=0)
std::set< GLSLUniform > uniforms
void addMainVarDec(GLSLAttribute att)
std::vector< std::string > generateFunctionCall()
void disableExtension(std::string extensionName)
const std::set< GLSLAttribute > & getMainVarDecs() const
std::set< GLSLVarying > varyings
osg_material_manager::FunctionCall FunctionCall
static bool mainVarDecs_unique_pred(GLSLAttribute &first, GLSLAttribute &second)
void addConstant(GLSLConstant constant)
std::vector< FunctionCall > funcs
osg_material_manager::MainVar MainVar
std::set< GLSLAttribute > mainVarDecs
const std::set< GLSLVarying > & getVaryings() const
void merge(ShaderFunc *u)
const std::set< GLSLConstant > & getConstants() const
const std::vector< GLSLExport > & getExports() const
void addSnippet(std::string line, int priority=0)
void addDependencyCode(std::string codeId, std::string code)
const std::vector< FunctionCall > & getFunctionCalls() const
std::set< GLSLAttribute > attributes
std::set< GLSLSuffix > suffixes
std::set< std::string > enabledExtensions