MCPcopy Create free account
hub / github.com/cginternals/globjects / addUniform

Method addUniform

source/globjects/source/Program.cpp:435–454  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

433}
434
435void Program::addUniform(AbstractUniform * uniform)
436{
437 assert(uniform != nullptr);
438
439 ref_ptr<AbstractUniform>& uniformReference = m_uniforms[uniform->identity()];
440
441 if (uniformReference)
442 {
443 uniformReference->deregisterProgram(this);
444 }
445
446 uniformReference = uniform;
447
448 uniform->registerProgram(this);
449
450 if (m_linked)
451 {
452 uniform->update(this, true);
453 }
454}
455
456void Program::updateUniforms() const
457{

Callers

nothing calls this directly

Calls 3

deregisterProgramMethod · 0.80
registerProgramMethod · 0.80
updateMethod · 0.45

Tested by

no test coverage detected