MCPcopy Create free account
hub / github.com/OGRECave/ogre / buildConstantDefinitions

Method buildConstantDefinitions

RenderSystems/GL/src/GLSL/src/OgreGLSLProgram.cpp:252–272  ·  view source on GitHub ↗

-----------------------------------------------------------------------

Source from the content-addressed store, hash-verified

250 }
251 //-----------------------------------------------------------------------
252 void GLSLProgram::buildConstantDefinitions()
253 {
254 // We need an accurate list of all the uniforms in the shader, but we
255 // can't get at them until we link all the shaders into a program object.
256
257
258 // Therefore instead, parse the source code manually and extract the uniforms
259 createParameterMappingStructures(true);
260 mLogicalToPhysical.reset();
261
262 GLSLLinkProgramManager::getSingleton().extractUniformsFromGLSL(
263 mSource, *mConstantDefs, getResourceLogName());
264
265 // Also parse any attached sources
266 for (auto childShader : mAttachedGLSLPrograms)
267 {
268 GLSLLinkProgramManager::getSingleton().extractUniformsFromGLSL(
269 childShader->getSource(), *mConstantDefs, childShader->getName());
270
271 }
272 }
273
274 //-----------------------------------------------------------------------
275 GLSLProgram::GLSLProgram(ResourceManager* creator,

Callers

nothing calls this directly

Calls 4

getSourceMethod · 0.80
resetMethod · 0.45
getNameMethod · 0.45

Tested by

no test coverage detected