@chao-mu wrote:
Hello,
I have two ofFBOs that have multiple textures attached to them. One is meant as a historical record of the second.
I am curious what the proper way of doing this is.
I’ve tried
last_outputs_.begin(); last_outputs_.activateAllDrawBuffers(); outputs_.draw(0, 0); last_outputs_.end();
but that only copies the first texture.
I have also tried the following:
for (int i=0; i < last_outputs_.getNumTextures(); i++) { ofTexture& tex = last_outputs_.getTexture(i); tex.bind(); outputs_.getTexture(i).draw(0, 0); tex.unbind(); }
But that doesn’t seem to transfer anything
I have also
last_outputs_.begin(); last_outputs_.activateAllDrawBuffers(); for (int i=0; i < last_outputs_.getNumTextures(); i++) { ofTexture& tex = last_outputs_.getTexture(i); tex.bind(); outputs_.getTexture(i).draw(0, 0); tex.unbind(); } last_outputs_.end();
but that, for some reason, wipes out texture i=0 if I wrote to texture i=1.
The code base is too massive to be useful to share, but if I get an idea of what SHOULD work, I can more target my debugging.
Also, as an additional note, I specifically don’t want to transfer bytes between the graphics card and CPU as the ultimate fate of last_outputs_ is to simply be passed through my shader pipeline (it’d be a waste).
Thank you,
HP.
Posts: 1
Participants: 1