-----------------------------------------------------------------------
| 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, |
nothing calls this directly
no test coverage detected