ofSetOrientation() makes drawings invisible after ofFbo.begin()/end()

Hi, I’m using OF v0.9.8 for iOS and I just found out calling ofSetOrientation() makes all drawings invisible after ofFbo.begin() and ofFbo.end() is called.

Here’s a simple test code.
In ofApp.h

ofFbo fbo;

In ofApp.mm

void ofApp::setup(){
    //ofSetOrientation(OF_ORIENTATION_90_RIGHT); //try uncommenting this
    fbo.allocate(200, 200, GL_RGBA);
    ofClear(255, 255, 255);

void ofApp::update(){

void ofApp::draw(){
    ofDrawCircle(ofGetWidth()/2, ofGetHeight()/2, ofGetHeight()/4);

If you run the code, you will see a red circle in the center.
However, if you change the orientation (you can uncomment ofSetOrientation() in the setup()), the red circle will no longer be visible.

It looks like changing the orientation affects drawings after writing to the FBO.

I tried the same code using the nightly and it didn’t have this problem.
(EDIT: I made a mistake and it does have this problem in the nightly too)

Does anyone have any idea what would be the cause of this bug?
Thank you so much.

Perhaps you can try using ofFbo from 0.10? Not sure if it’s directly compatible but shouldn’t need a lot of changes I think to make it work

1 Like

Hi @arturo
I’m sorry I just realized that I made a mistake when testing the code in 0.10.0 nightly. (I didn’t copy ofSetOrientation() which I originally had it in touchDown() and thought it works in the nightly)

So running the code in the nightly also have this problem.
I just double checked it with the newly downloaded nightly build.

You can try this with Xcode and simulator. (I also tried it with a real device, iPad air 2)

Any iOS user who can confirm this bug? Thank you so much!