MCPcopy Create free account
hub / github.com/SpartanJ/eepp / getAttributeLocation

Method getAttributeLocation

src/eepp/graphics/shaderprogram.cpp:293–305  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

291}
292
293Int32 ShaderProgram::getAttributeLocation( const std::string& Name ) {
294 if ( !mValid )
295 return -1;
296
297 std::map<std::string, Int32>::iterator it = mAttributeLocations.find( Name );
298 if ( it == mAttributeLocations.end() ) {
299#ifdef EE_SHADERS_SUPPORTED
300 Int32 Location = glGetAttribLocation( getHandler(), Name.c_str() );
301 mAttributeLocations[Name] = Location;
302#endif
303 }
304 return mAttributeLocations[Name];
305}
306
307void ShaderProgram::invalidateLocations() {
308 mUniformLocations.clear();

Callers 3

setShaderMethod · 0.80
setShaderMethod · 0.80
setShaderMethod · 0.80

Calls 3

c_strMethod · 0.80
findMethod · 0.45
endMethod · 0.45

Tested by

no test coverage detected