FBO resize when ofToggleFullscreen

hello is there a way i can easily resize the fbo if the ofToggleFullscreen is true? with out affecting the draw for some reason when i do this it deforms the objects in the draw

 im declaring the fbo like this in setup   
ofFboSettings e;
        e.width = ofGetWidth();
        e.height = ofGetHeight();
        e.numSamples= 24;
        e.internalformat = GL_RGBA;
        e.useDepth = true;

        e.depthStencilAsTexture = true;
        e.maxFilter= 8;


how it looks when ofToggleF…= false

how it looks when ofToggleF…= true

The picture is stretched because the available space changes, you can choose to clip it by drawing the fbo at 0,0 without specifying width and height. You could clear it and allocate it again with a different size but this is not necessary, just use a portion of it for your drawing and you’ll be fine.