std::string lookup_shader(std::vector<unsigned char> const& resource) { std::string source(lookup_string(resource)); resolve_includes(source); return source; }
std::string lookup_shader(std::string const& file) { std::string source(lookup_string(file)); resolve_includes(source); return source; }
// helper function to resolve a filename std::string find_file(const std::string& file, const std::vector<std::string> paths) { // search in every include path for a match for (size_t i = 0, S = paths.size(); i < S; ++i) { std::vector<Sass_Queued> resolved(resolve_includes(paths[i], file)); if (resolved.size()) return resolved[0].abs_path; } // nothing found return std::string(""); }