{"issue":{"created_at":"2011-09-07T12:56:23Z","state":"closed","updated_at":"2011-12-03T23:38:42Z","user":{"gravatar_id":"ecca3b1bb8135dec28204aa085c56627","id":428594,"url":"https://api.github.com/users/labe-me","avatar_url":"https://secure.gravatar.com/avatar/ecca3b1bb8135dec28204aa085c56627?d=https://a248.e.akamai.net/assets.github.com%2Fimages%2Fgravatars%2Fgravatar-140.png","login":"labe-me"},"comments":5,"body":"When ofSetBackgroundAuto(false) is executed and ofPushStyle() is used strange things happens to ofFbos.\r\n\r\nHere's a testApp to illustrate the problem:\r\n\r\n```c++\r\n#include \"testApp.h\"\r\n\r\n// Test background auto + ofFbo + pushStyle bug.\r\n//\r\n// When background auto is disabled, any call to ofPushStyle/ofPopStyle will break the fbo.\r\n//\r\n// Expected: green screen whatever these bool values\r\n// Actual: black background, fbo does not appear\r\n//\r\nbool useBackgroundAuto = false;\r\nbool useStyleContext = true;\r\n\r\nofFbo buffer;\r\n\r\nvoid testApp::setup(){\r\n    ofSetFrameRate(60);\r\n    ofSetBackgroundAuto(useBackgroundAuto);\r\n    ofBackground(0);\r\n\r\n    buffer.allocate();\r\n\r\n    // fill the buffer with green\r\n    buffer.begin();\r\n    if (useStyleContext) ofPushStyle();\r\n    ofSetColor(255, 0, 0);\r\n    ofFill();\r\n    ofRect(0,0,ofGetWidth(),ofGetHeight());\r\n    if (useStyleContext) ofPopStyle();\r\n    buffer.end();\r\n}\r\n\r\nvoid testApp::update(){\r\n}\r\n\r\nvoid testApp::draw(){\r\n    if (useStyleContext) ofPushStyle();\r\n    ofSetColor(255,255,255); // set buffer brightness to maximum\r\n    buffer.draw(0,0);\r\n    if (useStyleContext) ofPopStyle();\r\n}\r\n\r\nvoid testApp::keyPressed(int key){\r\n}\r\n\r\nvoid testApp::keyReleased(int key){\r\n}\r\n\r\nvoid testApp::mouseMoved(int x, int y ){\r\n}\r\n\r\nvoid testApp::mouseDragged(int x, int y, int button){\r\n}\r\n\r\nvoid testApp::mousePressed(int x, int y, int button){\r\n}\r\n\r\nvoid testApp::mouseReleased(int x, int y, int button){\r\n}\r\n\r\nvoid testApp::windowResized(int w, int h){\r\n}\r\n\r\nvoid testApp::gotMessage(ofMessage msg){\r\n}\r\n\r\nvoid testApp::dragEvent(ofDragInfo dragInfo){\r\n}\r\n```","assignee":null,"id":1589067,"pull_request":{"patch_url":null,"html_url":null,"diff_url":null},"labels":[{"name":"bug","color":"b31d1d","url":"https://api.github.com/repos/openframeworks/openFrameworks/labels/bug"},{"name":"core","color":"cc08bf","url":"https://api.github.com/repos/openframeworks/openFrameworks/labels/core"}],"number":731,"title":"ofSetBackgroundAuto(false) + ofFbo + ofPushStyle() = fbo.draw() do not work","html_url":"https://github.com/openframeworks/openFrameworks/issues/731","closed_at":"2011-12-03T23:38:42Z","url":"https://api.github.com/repos/openframeworks/openFrameworks/issues/731","milestone":null},"action":"created","comment":{"created_at":"2011-12-03T23:38:42Z","updated_at":"2011-12-03T23:38:42Z","user":{"gravatar_id":"2aed663a62fa8bf9f7aebe603d3998bb","id":327442,"url":"https://api.github.com/users/bilderbuchi","avatar_url":"https://secure.gravatar.com/avatar/2aed663a62fa8bf9f7aebe603d3998bb?d=https://a248.e.akamai.net/assets.github.com%2Fimages%2Fgravatars%2Fgravatar-140.png","login":"bilderbuchi"},"body":"ok, this is in develop. strange that it didn't auto-close.","id":3003891,"url":"https://api.github.com/repos/openframeworks/openFrameworks/issues/comments/3003891"}}