Fbo.begin() inside setup breaks rendering on iOS

Hi, I have a program that runs fine, but

  • If I allocate an fbo inside setup() and try drawing into it, the display becomes black and nothing can be rendered after that. This works fine on Linux.
  • If I comment out the fbo.begin() and fbo.end(), everything works fine.
  • If I move the .begin() and .end() to a later animation frame, it also works.

It took me a while to figure which lines were causing trouble.

Why is it that it’s “too early” to draw on the fbo?

ps. The program uses also objectiveC and Swift for audio. OF 0.9.8.

If i remember well iOS needs an fbo to render at all so OF sets up one when starting, probably the iOS window is doing something after setup so when unbinding an fbo instead of going back to 0 it goes back to whatever is the default iOS fbo.

This sounds like a bug though and the window should do that before calling setup so it’s possible to bind an fbo during setup