Can ofFbo be scaled?

I’m drawing something that can be zoomed, in between calls to redraw into separate ofFbo’s I’d like to temporarily stretch the image to give the user a better impression of seemless zooming. can i do something like convert to a texture and scale that?

You don’t need to convert it into a texture to scale it necessarily.
You could just change the width and the height you draw the FBO at depending on your desired zoom.

fbo.draw(0,0,ofGetWidth() * ZoomLevel, ofGetHeight() * ZoomLevel);

Although with this approach you will need to be careful that you don’t draw it so large that pixellation becomes a problem. To avoid this just be careful to allocate the FBO to a big enough size so this isn’t an issue even at your maximum zoom.

Another approach all together that would avoid the potential pixelation problem would be to use ofeasycam. You could draw the view from the camera to the FBO:

// draw your stuff

Then set the cameras distance from what it is drawing to set the zoom level.


OR you could just set your zoom level inside the fbo.

ofScale(zoomLevel, zoomLevel, zoomLevel); 
// draw your stuff 

thanks, lots of options.