ofxSlides - addon for presentations

Hi, I started using openframeworks not only for development but also for presentations, and I noticed I should release this as an addon. The hardest thing while making slides with oF is page handling; I first used switch-case, like

void testApp::draw(){
    switch(curPage) {
        case 0:
            // draw title
            break;
        // if I want to add a slide here, I need to modify all the rest of the cases
        case 1:
            // next slide
            break;
        case 2:
            // another slide
            break;
    }
}

but this is not flexible for arranging the slides. With ofxSlides, this becomes super simple, like

void testApp::draw(){
    slides.begin();
    if( slides++ ) {
        // draw title
    }
    // I can add slides here without changing the other blocks
    else if( slides++ ) {
        // next slide
    }
    else if( slides++ ) {
        // another slide
    }
    slides.end();
}

Try out the example code if interested: https://github.com/micuat/ofxSlides

1 Like