Quantcast
Channel: openFrameworks - Latest posts
Viewing all articles
Browse latest Browse all 40524

Sharing ofFbo between multiple windows: how? (shared_ptr?) [solved]

$
0
0

you can't share an fbo among windows but you can share the texture an ofFbo holds intetrnally. when creating the windows, on the second window set:

    settings.shareContextWith = mainWindow;
    shared_ptr<ofAppBaseWindow> secondWindow = ofCreateWindow(settings);

which will create the second window sharing the context with the first one. that allows to use most data GL objects, like textures, vbos, or any buffer but won't allow you to use state objects like fbos, vaos or shaders.


Viewing all articles
Browse latest Browse all 40524

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>