{"action":"opened","issue":{"url":"https://api.github.com/repos/openframeworks/openFrameworks/issues/4032","labels_url":"https://api.github.com/repos/openframeworks/openFrameworks/issues/4032/labels{/name}","comments_url":"https://api.github.com/repos/openframeworks/openFrameworks/issues/4032/comments","events_url":"https://api.github.com/repos/openframeworks/openFrameworks/issues/4032/events","html_url":"https://github.com/openframeworks/openFrameworks/issues/4032","id":92136444,"number":4032,"title":"ofVideoPlayer + Programmable Render Incorrect behavior on draw(ofRect)","user":{"login":"obviousjim","id":321434,"avatar_url":"https://avatars.githubusercontent.com/u/321434?v=3","gravatar_id":"","url":"https://api.github.com/users/obviousjim","html_url":"https://github.com/obviousjim","followers_url":"https://api.github.com/users/obviousjim/followers","following_url":"https://api.github.com/users/obviousjim/following{/other_user}","gists_url":"https://api.github.com/users/obviousjim/gists{/gist_id}","starred_url":"https://api.github.com/users/obviousjim/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/obviousjim/subscriptions","organizations_url":"https://api.github.com/users/obviousjim/orgs","repos_url":"https://api.github.com/users/obviousjim/repos","events_url":"https://api.github.com/users/obviousjim/events{/privacy}","received_events_url":"https://api.github.com/users/obviousjim/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/openframeworks/openFrameworks/labels/bug","name":"bug","color":"b31d1d"},{"url":"https://api.github.com/repos/openframeworks/openFrameworks/labels/core","name":"core","color":"db6a1f"},{"url":"https://api.github.com/repos/openframeworks/openFrameworks/labels/section-video","name":"section-video","color":"DDDDDD"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2015-06-30T16:24:11Z","updated_at":"2015-06-30T16:24:11Z","closed_at":null,"body":"The expected behavior when drawing images with ofRectangle (or specifying x,y,w,h explicitly) is that the texture will be scaled into the rectangle. \r\n\r\nUnder GLProgrammableRenderer, ofVideoPlayer's draw(ofRectangle) does not scale the video texture, rather it crops or stretches it.\r\n\r\n    ofVideoPlayer player;\r\n    player.load(\"mymovie.mov\");\r\n    ofRectangle rect(0,0,player.getWidth()*2,player.getHeight()*2);\r\n    // video only fills top left and the rest of the rectangle space is texture stretched\r\n    player.draw(rect);\r\n    //correctly scales\r\n    player.getTexture().draw(rect); \r\n\r\nThe culprit is here: https://github.com/openframeworks/openFrameworks/blob/master/libs/openFrameworks/gl/ofGLProgrammableRenderer.cpp#L412 where the ofBaseVideoDraws is rendered by the programmable renderer using a mesh subsection.\r\n\r\n"}}