Reading frames from fbo to deque

Hi everyone,

I try to create a slit scan effect, but instead of reading a video file I want to use an fbo. I try to store the frames in a deque, to have access to older frames later. I want to store always 150 frames at a time. The problem is that there is just one frame in the deque. Does somebody know how to store more? There is nothing like “.isFrameNew()” for fbos.

Would be glad about some help.
Best, David


ofFbo fbo1;
void drawfbo1();
deque<ofPixels> frames;
int N;


int N = 150;
    ofClear(255, 255, 255, 0);
ofPixels pixels;
//ofLog(OF_LOG_NOTICE, "pixels " + ofToString(pixels.size()));
//ofLog(OF_LOG_NOTICE, "frames " + ofToString(frames.size()));
if (frames.size() > N){

Hi! This doesn’t solve the problem using deque, but a naive suggestion might be that you declare an array of 150 FBOs in your header file, then in setup you loop through and declare the size of each frame using yourFBO[i].allocate(ofGetWidth(), ofGetHeight()) , then in the update function you access the fbo using ofGetFrameNum()%150.

im not sure what your prior experience is so lmk if you have questions! & sorry if this was insultingly simple!