| 291 | } |
| 292 | |
| 293 | Int32 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 | |
| 307 | void ShaderProgram::invalidateLocations() { |
| 308 | mUniformLocations.clear(); |