[Bf-cycles] Build without OpenImageIO

Guillaume Chéreau guillaume.chereau at gmail.com
Tue Mar 6 04:47:25 CET 2018


I just started a branch of Cycles on github for the goxel version.

My first commit allows to use std::string for ustring and a custom
implementation of TypeDef:
https://github.com/guillaumechereau/cycles/commit/0f286bc4da5536a19640eb4ede640423e317e733

Regards,
Guillaume

On Tue, Mar 6, 2018 at 10:05 AM, Guillaume Chéreau
<guillaume.chereau at gmail.com> wrote:
> 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



-- 
Guillaume
guillaume.chereau at gmail.com
+886 970422910


More information about the Bf-cycles mailing list