Ok, this is an odd one which took me a while to figure out.
Create a new project and add this draw()
function:
void ofApp::draw(){
ofSetColor(255, 0, 0);
ofDrawCircle(ofGetWidth()/2.0, ofGetHeight()/2.0, 50);
ofSaveFrame();
ofExit();
}
As expected I end up with a file called 0.png
with a red circle in the center.
Now in main.cpp
change the canvas size:
ofSetupOpenGL(910, 512, OF_WINDOW);
Run the program again: this time you (I) end up with a black image, sometimes with some noise at the bottom.
Some quick testing didn’t show any logical pattern. There is a whole range of sizes that don’t work, while others do (800x512 works, 950x512 doesn’t, 1000x512 does, etc.)
Before I file this as a bug, thought I’d check here to see if there is a logical reason for this error. Not sure if this could be hardware specific for instance
- of_v20170414 (about two weeks old)
- Linux 64 bit Debian Stretch (testing)
- Nvidia GTX 1080