| 429 | } |
| 430 | |
| 431 | fs::path ShaderPreprocessor::findFullPath( const fs::path &includePath, const fs::path ¤tDirectory ) |
| 432 | { |
| 433 | auto fullPath = currentDirectory / includePath; |
| 434 | if( fs::exists( fullPath ) ) |
| 435 | return fs::canonical( fullPath ); |
| 436 | |
| 437 | for( auto dirIt = mSearchDirectories.rbegin(); dirIt != mSearchDirectories.rend(); ++dirIt ) { |
| 438 | fullPath = *dirIt / includePath; |
| 439 | if( fs::exists( fullPath ) ) |
| 440 | return fs::canonical( fullPath ); |
| 441 | } |
| 442 | |
| 443 | return {}; |
| 444 | } |
| 445 | |
| 446 | } } // namespace cinder::gl |