diff --git a/libs/openFrameworks/gl/ofFbo.cpp b/libs/openFrameworks/gl/ofFbo.cpp index 3c3d16d8810..32632850f86 100644 --- a/libs/openFrameworks/gl/ofFbo.cpp +++ b/libs/openFrameworks/gl/ofFbo.cpp @@ -302,6 +302,15 @@ ofFbo::ofFbo(const ofFbo & mom){ } } +//-------------------------------------------------------------- +void ofFbo::operator+=(const ofFbo & fbo){ + if (fbo.isAllocated()) { + this->begin(); + fbo.draw(0,0); + this->end(); + } +} + //-------------------------------------------------------------- ofFbo & ofFbo::operator=(const ofFbo & mom){ if(&mom==this) return *this; diff --git a/libs/openFrameworks/gl/ofFbo.h b/libs/openFrameworks/gl/ofFbo.h index 2ec3ad43781..7fab6294edf 100644 --- a/libs/openFrameworks/gl/ofFbo.h +++ b/libs/openFrameworks/gl/ofFbo.h @@ -48,6 +48,7 @@ class ofFbo : public ofBaseDraws, public ofBaseHasTexture { ofFbo(); ofFbo(const ofFbo & mom); ofFbo & operator=(const ofFbo & fbo); + void operator+=(const ofFbo & fbo); ofFbo(ofFbo && mom); ofFbo & operator=(ofFbo && fbo); virtual ~ofFbo();