Bridge between ImGui and Cereal
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
include
samples/CerealImGui
.gitignore
README.md
cinderblock.png
cinderblock.xml
example.png

README.md

Cinder-CerealImGui

Bridge between Immediate mode GUI Library and Cereal for use with Cinder 0.9.

How to use

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 e