Exemplo n.º 1
0
void ShaderManager::addShaderSearchPath(InviwoApplication::PathType pathType, std::string relativeShaderSearchPath) {
    bool added = addShaderSearchPathImpl(InviwoApplication::getPtr()->getPath(pathType) + "/" + relativeShaderSearchPath);
#ifdef IVW_EXTERNAL_MODULES_PATH_COUNT
    if(!added && pathType == InviwoApplication::PATH_MODULES){
        for (int i = 0; !added && i < IVW_EXTERNAL_MODULES_PATH_COUNT; ++i){
            added |= addShaderSearchPathImpl(externalModulePaths_[i] + "/" + relativeShaderSearchPath);
        }
    }
#endif
    if (!added){
        LogWarn("Failed to add shader search path: " << relativeShaderSearchPath);
        LogInfo("Tried with:");
        LogInfo("\t" << InviwoApplication::getPtr()->getPath(pathType)  + "/" + relativeShaderSearchPath);
#ifdef IVW_EXTERNAL_MODULES_PATH_COUNT
        if (pathType == InviwoApplication::PATH_MODULES){
            for (auto& elem : externalModulePaths_) {
                LogInfo("\t" << elem << "/" << relativeShaderSearchPath);
            }
        }
#endif
    }
}
Exemplo n.º 2
0
void ShaderManager::addShaderSearchPath(std::string shaderSearchPath) {
    if (!addShaderSearchPathImpl(shaderSearchPath)) {
        LogWarn("Failed to add shader search path: " << shaderSearchPath);
    }
}