Graphical

how work graphical Raylib with KapEngine ?

How to use KapRaylib ?

to use it you just have add it in KapEngine. For that you just have to follow the code behind :

Main.cpp
void initRaylib(KapEngine::KEngine &engine) {
    auto libManager = engine.getGraphicalLibManager();
    auto raylib = std::make_shared<KapEngine::Graphical::Raylib::RaylibGraphical>(*manager);
    
    manager->addLib(raylib);
    manager->changeLib(raylib->getName());
}

void main() {
    KapEngine::KEngine engine(false);
    engine.setScreenSize({720, 480});
    
    initRaylib(engine);
    engine.run();
}

With this code, you gonna run your engine with KapRaylib. There is nothing more to do. Just enjoy 😄

Last updated