I make a basic feedback example in OF 8.4.It works fine.But when i write the same code in OF 9.0/9.2. The finally effect is different.Seem to be same offset.
Here is my code:
// in ofApp.h
ofFbo fbo;
ofFbo feedback;
// in ofApp.cpp
void ofApp::setup(){
fbo.allocate(ofGetWidth(),ofGetHeight(),GL_RGBA);
fbo.begin();
ofClear(0,255);
fbo.end();
feedback.allocate(ofGetWidth(),ofGetHeight(),GL_RGBA);
feedback.begin();
ofClear(0,255);
feedback.end();
}
//--------------------------------------------------------------
void ofApp::update(){
fbo.begin();
ofSetColor(255);
feedback.draw(-20,-20,ofGetWidth() + 40,ofGetHeight() + 40);
// glBlendFuncSeparate (GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA, GL_ONE, GL_ONE_MINUS_SRC_ALPHA);
ofSetColor(ofRandom(255),ofRandom(255),255);
ofDrawCircle(mouseX,mouseY,50);
fbo.end();
feedback.begin();
ofSetColor(255);
fbo.draw(0,0);
feedback.end();
}
//--------------------------------------------------------------
void ofApp::draw(){
fbo.draw(0,0);
}