MCPcopy Create free account
hub / github.com/ImageEngine/cortex / ~ScopedBinding

Method ~ScopedBinding

src/IECoreGL/Shader.cpp:945–964  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

943}
944
945Shader::Setup::ScopedBinding::~ScopedBinding()
946{
947 for( const auto &keyValue : m_setup.m_memberData->uniformValues )
948 {
949 keyValue.second->unbind();
950 }
951 for( const auto &keyValue : m_setup.m_memberData->vertexValues )
952 {
953 keyValue.second->unbind();
954 }
955
956 glUseProgram( m_previousProgram );
957 if( Selector *currentSelector = Selector::currentSelector() )
958 {
959 if( currentSelector->mode() == Selector::IDRender )
960 {
961 currentSelector->popIDShader();
962 }
963 }
964}
965
966///////////////////////////////////////////////////////////////////////////////
967// common shader sources

Callers

nothing calls this directly

Calls 3

unbindMethod · 0.45
modeMethod · 0.45
popIDShaderMethod · 0.45

Tested by

no test coverage detected