Quantcast
Channel: bugs, errors - openFrameworks
Viewing all articles
Browse latest Browse all 636

ofSetFullscreen() automatically clears the screen once?

$
0
0

@cuinjune wrote:

If I disable automatic background clearing by calling ofSetBackgroundAuto(false);, and then if I call ofSetFullscreen(true); to enter the fullscreen mode, it seems to clear out the previous drawings.

Here's my simple test code.

//--------------------------------------------------------------
void ofApp::setup(){

    ofSetBackgroundAuto(false);
}

//--------------------------------------------------------------
void ofApp::update(){

}

//--------------------------------------------------------------
void ofApp::draw(){

    ofTranslate(ofGetWidth()/2, ofGetHeight()/2);
    ofRotateZ(ofGetFrameNum()/2);
    ofTranslate(ofGetHeight()/4, 0);
    ofDrawCircle(0, 0, ofGetHeight()/40);
}

//--------------------------------------------------------------
void ofApp::keyPressed(int key){

    if (key == '1')
        ofSetFullscreen(true);
    else if (key == '2')
        ofSetFullscreen(false);
}

If you run the program and press '1' to enter the fullscreen mode, you will see the previous drawings getting cleared.

Is this natural behaviour or could this be a bug?
Thanks in advance!

Posts: 2

Participants: 2

Read full topic


Viewing all articles
Browse latest Browse all 636

Trending Articles