Storing render surface stack on fbo.begin() to restore at fbo.end().#6578
Storing render surface stack on fbo.begin() to restore at fbo.end().#6578sadmb wants to merge 2 commits intoopenframeworks:masterfrom sadmb:master
Conversation
By this change, you can use nested fbo: fbo.begin(); fbo.begin(); fbo.end(); fbo.end();
|
thanks for the contribution, this has been discussed before though and was considered that it doesn't add any functionality that is really useful since there can only be one FBO bound at any given time and adds certain complexity to the FBO class so we decided against including it. do you have any specific use case? usually you would do if at the end of using fbo1 and then fbo2 you want to then use fbo1 again |
|
@arturoc I usually use layer management system to make some app. then I make each layer class inherits layer base class like Sometimes I need to use fbo inside those layers with changing viewport. Other than this example, there're some addons using fbo expect you to write between its begin and end, and sometimes you may want to use fbo there so I thought it is better to store render surfaces. :) |
By this change, you can use nested fbo:
fbo.begin();
fbo.begin();
fbo.end();
fbo.end();