Flash of white when starting app in OF_FULLSCREEN on mac

i’m trying to tie a couple of OF apps together with a controller app and child apps.

My initial idea was to have a black background on the desktop and have the of apps all start up with a fade from black to make it look a little nicer, but there is a flash of white when starting up the app.

Using OF_GAME_MODE does not have this flash of white.

A quick read through the window creation code doesn’t make anything obvious jump out to me.

Any idea where I should look for where this is happening?


also, there is a white flash as the app is exiting in both OF_FULLSCREEN and OF_GAME_MODE.

what are you setting the background to? if you are setting it to white, try making it red so that you can see what is causing the offence

plural, I wonder if you ever solved this - I am having a similar issue with an iOS app I’m building.

I’ve had problems when I’ve had a lot of stuff going on in Setup(), I’ve bypassed this before by having another setup function which gets called when ofGetFrameNum()==2. In the mean time I can then draw the background to be whatever colour is needed, or an image for instance.

Thanks, Miles. That sounds like a tactic worth trying. In the meantime, I did some digging in the OF API and realised that the main OF view is being added as a subview in viewDidLoad, after which setup() is called, also in viewDidLoad. Well, I’m also adding my subView in setup(). (It was not structured like this in OF 0.7, I don’t think.) What I found worked is changing ofxiOSGetView() to ofxiOSGetGLParentView(). I do sometimes get a warning about the inadvisability of launching yet another view controller from my subview (I have a couple modal screens that pop up), but I’m happy to live with that as long as things keep working.

That sounds like a much better avenue to go down, mine is a bodge rather than a fix