i can’t figure out how to make a perfect copy of a texture.
i know i could read the texture’s pixels from the GPU back to the CPU and then load them in to a new texture.
but that seems like a lot of back and forth.
memcpy(videoData[nRecorded], vidPlayer.getPixels(), imgW*imgH*imgColors); nRecorded++;
This does not work either because it only passes on the reference. As soon as oldTex changes newTex has the same data.
ofTexture newTex = oldTex;
someone in the form suggested to make an array of ofFbo’s, draw the old texture inside one ofFbo and so on.
is that the best option?
frameCollector.push_back(ofFbo()); frameCollector.back().allocate(fullFBO.getWidth(), fullFBO.getHeight(),GL_RGB); frameCollector.back().begin(); fullFBO.draw(0,0); frameCollector.back().end();
Basically i am trying to fill a vector with the last x frames from my video feed.