MCPcopy Create free account
hub / github.com/ImageEngine/cortex / addPrimitiveVariablesToShaderSetup

Method addPrimitiveVariablesToShaderSetup

src/IECoreGL/Primitive.cpp:357–368  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

355}
356
357void Primitive::addPrimitiveVariablesToShaderSetup( Shader::Setup *shaderSetup, const std::string &vertexPrefix, GLuint vertexDivisor ) const
358{
359 for( AttributeMap::const_iterator it = m_vertexAttributes.begin(), eIt = m_vertexAttributes.end(); it != eIt; it++ )
360 {
361 shaderSetup->addVertexAttribute( vertexPrefix + it->first, it->second, vertexDivisor );
362 shaderSetup->addUniformParameter( vertexPrefix + it->first + "Active", new IECore::BoolData( true ) );
363 }
364 for( AttributeMap::const_iterator it = m_uniformAttributes.begin(), eIt = m_uniformAttributes.end(); it != eIt; it++ )
365 {
366 shaderSetup->addUniformParameter( it->first, it->second );
367 }
368}
369
370void Primitive::render( const State *currentState, IECore::TypeId style ) const
371{

Callers 1

shaderSetupMethod · 0.80

Calls 4

addUniformParameterMethod · 0.80
beginMethod · 0.45
endMethod · 0.45
addVertexAttributeMethod · 0.45

Tested by

no test coverage detected