Bridge between Immediate mode GUI Library and Cereal for use with Cinder 0.9.
you need to define a serialize function in your object:
class Simple{
public:
float ffloat = 3.14;
int iint = 42;
ci::vec2 vvec2 {10, 20};
std::string sstring = "hello world";
};
template<class Archive>
void serialize( Archive& archive, Simple& simple ){
archive( CEREAL_NVP_( ". custom name ", simple.ffloat), simple.iint, simple.vvec2, simple.sstring );
}
To use the ImGuiArchive, you can just declare it in the draw function
Simple simpleObject;
void CinderApp::draw()
{
cereal::ImGuiArchive uiArchive;
uiArchive(simpleObject);
}
suports drawing float, int, bool, std::string, glm::vec2, glm::vec3, glm::quat