[Bf-cycles] Build without OpenImageIO
Guillaume Chéreau
guillaume.chereau at gmail.com
Tue Mar 6 03:05:58 CET 2018
It is actually not difficult to replace oiio ustring with std::string
in the code, since the api are almost the same, but the performance
are probably not as good with std::string.
In util/util_param.h, I can comment out the OpenImageIO/ustring.h
include and add those lines:
// ustring implementation based on std::string.
class ustring : public std::string
{
public:
ustring() {}
explicit ustring(const char *str) : std::string(str) {}
ustring (const ustring &str) : ustring(str.c_str()) {}
ustring (const std::string &str) : ustring(str.c_str()) {}
const std::string &string() const { return *this; }
operator int(void) const { return !empty(); }
const ustring &operator=(const char *str) { *this = str; return *this; }
};
typedef std::hash<std::string> ustringHash;
And the compilation works.
Similar treatment can be done for typedesc.
Regards,
Guillaume
--
Guillaume
guillaume.chereau at gmail.com
+886 970422910
More information about the Bf-cycles
mailing list