{"action":"created","issue":{"url":"https://api.github.com/repos/openframeworks/openFrameworks/issues/5951","repository_url":"https://api.github.com/repos/openframeworks/openFrameworks","labels_url":"https://api.github.com/repos/openframeworks/openFrameworks/issues/5951/labels{/name}","comments_url":"https://api.github.com/repos/openframeworks/openFrameworks/issues/5951/comments","events_url":"https://api.github.com/repos/openframeworks/openFrameworks/issues/5951/events","html_url":"https://github.com/openframeworks/openFrameworks/issues/5951","id":311724518,"number":5951,"title":"iOS bug drawing with FBO and ofSetOrientation. ","user":{"login":"ofTheo","id":144000,"avatar_url":"https://avatars3.githubusercontent.com/u/144000?v=4","gravatar_id":"","url":"https://api.github.com/users/ofTheo","html_url":"https://github.com/ofTheo","followers_url":"https://api.github.com/users/ofTheo/followers","following_url":"https://api.github.com/users/ofTheo/following{/other_user}","gists_url":"https://api.github.com/users/ofTheo/gists{/gist_id}","starred_url":"https://api.github.com/users/ofTheo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ofTheo/subscriptions","organizations_url":"https://api.github.com/users/ofTheo/orgs","repos_url":"https://api.github.com/users/ofTheo/repos","events_url":"https://api.github.com/users/ofTheo/events{/privacy}","received_events_url":"https://api.github.com/users/ofTheo/received_events","type":"User","site_admin":false},"labels":[{"id":28683,"url":"https://api.github.com/repos/openframeworks/openFrameworks/labels/bug","name":"bug","color":"b31d1d","default":true},{"id":26715,"url":"https://api.github.com/repos/openframeworks/openFrameworks/labels/iOS","name":"iOS","color":"2babad","default":false},{"id":851529842,"url":"https://api.github.com/repos/openframeworks/openFrameworks/labels/open%20gl%20es","name":"open gl es","color":"06e29d","default":false}],"state":"open","locked":false,"assignee":{"login":"ofTheo","id":144000,"avatar_url":"https://avatars3.githubusercontent.com/u/144000?v=4","gravatar_id":"","url":"https://api.github.com/users/ofTheo","html_url":"https://github.com/ofTheo","followers_url":"https://api.github.com/users/ofTheo/followers","following_url":"https://api.github.com/users/ofTheo/following{/other_user}","gists_url":"https://api.github.com/users/ofTheo/gists{/gist_id}","starred_url":"https://api.github.com/users/ofTheo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ofTheo/subscriptions","organizations_url":"https://api.github.com/users/ofTheo/orgs","repos_url":"https://api.github.com/users/ofTheo/repos","events_url":"https://api.github.com/users/ofTheo/events{/privacy}","received_events_url":"https://api.github.com/users/ofTheo/received_events","type":"User","site_admin":false},"assignees":[{"login":"ofTheo","id":144000,"avatar_url":"https://avatars3.githubusercontent.com/u/144000?v=4","gravatar_id":"","url":"https://api.github.com/users/ofTheo","html_url":"https://github.com/ofTheo","followers_url":"https://api.github.com/users/ofTheo/followers","following_url":"https://api.github.com/users/ofTheo/following{/other_user}","gists_url":"https://api.github.com/users/ofTheo/gists{/gist_id}","starred_url":"https://api.github.com/users/ofTheo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ofTheo/subscriptions","organizations_url":"https://api.github.com/users/ofTheo/orgs","repos_url":"https://api.github.com/users/ofTheo/repos","events_url":"https://api.github.com/users/ofTheo/events{/privacy}","received_events_url":"https://api.github.com/users/ofTheo/received_events","type":"User","site_admin":false}],"milestone":{"url":"https://api.github.com/repos/openframeworks/openFrameworks/milestones/12","html_url":"https://github.com/openframeworks/openFrameworks/milestone/12","labels_url":"https://api.github.com/repos/openframeworks/openFrameworks/milestones/12/labels","id":264335,"number":12,"title":"0.10.0","description":"","creator":{"login":"bilderbuchi","id":327442,"avatar_url":"https://avatars2.githubusercontent.com/u/327442?v=4","gravatar_id":"","url":"https://api.github.com/users/bilderbuchi","html_url":"https://github.com/bilderbuchi","followers_url":"https://api.github.com/users/bilderbuchi/followers","following_url":"https://api.github.com/users/bilderbuchi/following{/other_user}","gists_url":"https://api.github.com/users/bilderbuchi/gists{/gist_id}","starred_url":"https://api.github.com/users/bilderbuchi/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bilderbuchi/subscriptions","organizations_url":"https://api.github.com/users/bilderbuchi/orgs","repos_url":"https://api.github.com/users/bilderbuchi/repos","events_url":"https://api.github.com/users/bilderbuchi/events{/privacy}","received_events_url":"https://api.github.com/users/bilderbuchi/received_events","type":"User","site_admin":false},"open_issues":125,"closed_issues":117,"state":"open","created_at":"2013-02-11T12:18:09Z","updated_at":"2018-04-05T20:48:04Z","due_on":null,"closed_at":null},"comments":14,"created_at":"2018-04-05T18:41:38Z","updated_at":"2018-04-06T21:08:28Z","closed_at":null,"author_association":"CONTRIBUTOR","body":"Found a different bug which prevents drawing on iOS except in Portrait mode. \r\n\r\nIt looks like when FBOs are being drawn in landscape mode they are being drawn backwards somehow? There is a big black triangle over part of the image. \r\n\r\n```\r\n//--------------------------------------------------------------\r\nvoid ofApp::setup(){\r\n    ofSetOrientation(OF_ORIENTATION_90_RIGHT);\r\n\r\n    fbo.allocate(1024, 1024, GL_RGBA);\r\n\r\n    fbo.begin();\r\n    \r\n        ofClear(255, 255, 255, 255);\r\n        ofSetColor(255, 0, 0);\r\n        ofDrawCircle(ofGetWidth()/2, ofGetHeight()/2, 300);\r\n    \r\n    fbo.end();\r\n\r\n\r\n}\r\n//--------------------------------------------------------------\r\nvoid ofApp::update(){\r\n}\r\n\r\n//--------------------------------------------------------------\r\nvoid ofApp::draw(){\r\n    ofBackground(0);\r\n    \r\n    if( bRotate ){\r\n        ofSetOrientation(OF_ORIENTATION_90_RIGHT);//Set iOS to Orientation Landscape Right\r\n    }else{\r\n        ofSetOrientation(OF_ORIENTATION_DEFAULT);//Set iOS to Portrait\r\n    }\r\n    \r\n    ofSetColor(255);\r\n    fbo.draw(0,0);\r\n}\r\n\r\n//--------------------------------------------------------------\r\nvoid ofApp::exit(){    \r\n}\r\n\r\n//--------------------------------------------------------------\r\nvoid ofApp::touchDown(ofTouchEventArgs & touch){\r\n\tbRotate = true;\r\n}\r\n\r\n//--------------------------------------------------------------\r\nvoid ofApp::touchMoved(ofTouchEventArgs & touch){\r\n}\r\n\r\n//--------------------------------------------------------------\r\nvoid ofApp::touchUp(ofTouchEventArgs & touch){\r\n\tbRotate = false;\r\n}\r\n```\r\n\r\nThis is what it looks like if you have ofSetOrientation(OF_ORIENTATION_90_RIGHT) set in ofApp::setup or if you just have it before the draw call ( you can even setup the fbo with no orientation set and if you have ofSetOrientation(OF_ORIENTATION_90_RIGHT) before fbo::draw it causes this  issue ). \r\n\r\n<img width=\"1050\" alt=\"screen shot 2018-04-05 at 11 17 38 am\" src=\"https://user-images.githubusercontent.com/144000/38385078-c5270346-38c5-11e8-8aa5-6562513da4c1.png\">\r\n\r\nThis is what it looks like if you have ofSetOrientation(OF_ORIENTATION_DEFAULT); before the draw call or if you don't set orientation anywhere in the app. \r\n\r\n<img width=\"1022\" alt=\"screen shot 2018-04-05 at 11 18 31 am\" src=\"https://user-images.githubusercontent.com/144000/38385210-2536b330-38c6-11e8-9c97-c074ca1463ed.png\">\r\n\r\nI think this is to do with the vFlip and or matrix stuff\r\nhttps://github.com/openframeworks/openFrameworks/blob/master/libs/openFrameworks/utils/ofMatrixStack.cpp#L49\r\n\r\nIf I setup the app this way: \r\n( notice the false flag for ofSetOrientation vFlip ) \r\n\r\n```\r\n//--------------------------------------------------------------\r\nvoid ofApp::setup(){\r\n    ofSetOrientation(OF_ORIENTATION_90_RIGHT, false);\r\n\r\n    fbo.allocate(1024, 1024, GL_RGBA);\r\n\r\n    fbo.begin();\r\n    \r\n        ofClear(255, 255, 255, 255);\r\n        ofSetColor(255, 0, 0);\r\n        ofDrawCircle(ofGetWidth()/2, ofGetHeight()/2, 300);\r\n    \r\n    fbo.end();\r\n}\r\n//--------------------------------------------------------------\r\nvoid ofApp::draw(){\r\n    ofBackground(0);\r\n    ofSetColor(255);\r\n    fbo.draw(0,0);\r\n}\r\n```\r\n\r\nThis produces: \r\n\r\n<img width=\"1050\" alt=\"screen shot 2018-04-05 at 11 25 28 am\" src=\"https://user-images.githubusercontent.com/144000/38385221-2bd61d3e-38c6-11e8-81dc-09645dd626ac.png\">\r\n\r\n\r\n"},"comment":{"url":"https://api.github.com/repos/openframeworks/openFrameworks/issues/comments/379379661","html_url":"https://github.com/openframeworks/openFrameworks/issues/5951#issuecomment-379379661","issue_url":"https://api.github.com/repos/openframeworks/openFrameworks/issues/5951","id":379379661,"user":{"login":"ofTheo","id":144000,"avatar_url":"https://avatars3.githubusercontent.com/u/144000?v=4","gravatar_id":"","url":"https://api.github.com/users/ofTheo","html_url":"https://github.com/ofTheo","followers_url":"https://api.github.com/users/ofTheo/followers","following_url":"https://api.github.com/users/ofTheo/following{/other_user}","gists_url":"https://api.github.com/users/ofTheo/gists{/gist_id}","starred_url":"https://api.github.com/users/ofTheo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ofTheo/subscriptions","organizations_url":"https://api.github.com/users/ofTheo/orgs","repos_url":"https://api.github.com/users/ofTheo/repos","events_url":"https://api.github.com/users/ofTheo/events{/privacy}","received_events_url":"https://api.github.com/users/ofTheo/received_events","type":"User","site_admin":false},"created_at":"2018-04-06T21:08:28Z","updated_at":"2018-04-06T21:08:28Z","author_association":"CONTRIBUTOR","body":"It also seems to affect images / textures as well as FBOs. \r\n\r\nIf you take the imageLoaderexample and change:\r\n\r\n```\r\n    ofScale(0.5, 0.5, 1.0);\r\n```\r\n\r\nin draw to:\r\n\r\n```\r\n    ofScale(1.5, 1.5, 1.0);\r\n```\r\n\r\nThe texture that is drawing bigger than the screen gets the artifact too. \r\nIt seems to be the same color as the clear color. \r\n\r\n<img width=\"1050\" alt=\"screen shot 2018-04-06 at 2 06 39 pm\" src=\"https://user-images.githubusercontent.com/144000/38444427-f7d49e3c-39a3-11e8-9e5a-6438b10021b8.png\">\r\n\r\n\r\n"}}
{"actor":{"display_login":"ofTheo"}}