I have been assuming it would essentially fill the visible screen with the specified color. It seemed to have the same effect as ofDrawRectangle for the screen, but seemed to be slightly faster.
But then my client tried my program that sometimes sets ofSetBackgroundAuto(false) and which was working fine on my Windows and Mac computers, on two of his Windows computers, and on those computers (which do fine when ofSetBackgroundAuto(true) is set), they either showed a black screen or weren’t wiping the background when I called ofBackground() in Draw().
Checking the documentation, I see:
Sets the background color.
It takes as input r,g,b (0-255). The background is cleared automatically, just before the draw() command, so if the background color is not changing, you could call this inside of setup() (once, at the start of the application). If the background color is changing, you can call this inside of update().
Which doesn’t clearly communicate to me what ofBackground() actually does. And I’m quite surprised that it suggests calling it in Update() rather than in Draw(). Is that a mistake, or is it like ofSetColor(), where you’re just telling OF what color to draw the background when IT does that itself? And then for whatever reason, on some Windows computers, it ends up happening at different times, either right before draw, or right after ofBackground is called?
I’m quite confused…