Skip to content

Hperigo/Cinder-CerealImGui

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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

About

Bridge between ImGui and Cereal

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages