{"action":"created","issue":{"url":"https://api.github.com/repos/openframeworks/openFrameworks/issues/3805","labels_url":"https://api.github.com/repos/openframeworks/openFrameworks/issues/3805/labels{/name}","comments_url":"https://api.github.com/repos/openframeworks/openFrameworks/issues/3805/comments","events_url":"https://api.github.com/repos/openframeworks/openFrameworks/issues/3805/events","html_url":"https://github.com/openframeworks/openFrameworks/issues/3805","id":73676461,"number":3805,"title":"ofMesh texCoords not being sent to shader","user":{"login":"kylemcdonald","id":157106,"avatar_url":"https://avatars.githubusercontent.com/u/157106?v=3","gravatar_id":"","url":"https://api.github.com/users/kylemcdonald","html_url":"https://github.com/kylemcdonald","followers_url":"https://api.github.com/users/kylemcdonald/followers","following_url":"https://api.github.com/users/kylemcdonald/following{/other_user}","gists_url":"https://api.github.com/users/kylemcdonald/gists{/gist_id}","starred_url":"https://api.github.com/users/kylemcdonald/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kylemcdonald/subscriptions","organizations_url":"https://api.github.com/users/kylemcdonald/orgs","repos_url":"https://api.github.com/users/kylemcdonald/repos","events_url":"https://api.github.com/users/kylemcdonald/events{/privacy}","received_events_url":"https://api.github.com/users/kylemcdonald/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2015-05-06T16:52:52Z","updated_at":"2015-08-11T20:37:20Z","closed_at":null,"body":"Setup: 0.9.0, OS X 10.10.3, XCode 6.3\r\n\r\n`ofMesh::addColor()` gets through to the fragment shader in `gl_Color`, but `ofMesh::addTexCoord()` doesn't get through in `gl_TexCoord`. I tried adding my own vertex shader to capture `gl_MultiTexCoord0` into a custom varying, but that didn't do anything. If I switch from `ofMesh` to `ofVboMesh` then it works. I found something in the changelog mentioning this was refactored, but couldn't figure out what might have caused this bug.\r\n\r\nExample code:\r\n\r\n```c++\r\n#include \"ofMain.h\"\r\n\r\n#define str(x) #x\r\nstring frag =\r\nstr(\r\n    void main() {\r\n        float alpha = max(mod(gl_Color.r * 10., 1.),\r\n                          mod(gl_TexCoord[0].g * 10., 1.));\r\n        gl_FragColor = vec4(gl_Color.rgb, alpha);\r\n    }\r\n    );\r\n\r\nclass ofApp : public ofBaseApp {\r\npublic:\r\n    ofShader shader;\r\n    ofMesh mesh;\r\n    void setup() {\r\n        shader.setupShaderFromSource(GL_FRAGMENT_SHADER, frag);\r\n        shader.linkProgram();\r\n        mesh.setMode(OF_PRIMITIVE_TRIANGLE_FAN);\r\n        \r\n        mesh.addVertex(ofVec2f(0, 0));\r\n        mesh.addColor(ofFloatColor(0, 0, 0));\r\n        mesh.addTexCoord(ofVec2f(0, 0));\r\n        \r\n        mesh.addVertex(ofVec2f(256, 0));\r\n        mesh.addColor(ofFloatColor(1, 0, 0));\r\n        mesh.addTexCoord(ofVec2f(1, 0));\r\n        \r\n        mesh.addVertex(ofVec2f(256, 256));\r\n        mesh.addColor(ofFloatColor(1, 1, 0));\r\n        mesh.addTexCoord(ofVec2f(1, 1));\r\n        \r\n        mesh.addVertex(ofVec2f(0, 256));\r\n        mesh.addColor(ofFloatColor(0, 1, 0));\r\n        mesh.addTexCoord(ofVec2f(0, 1));\r\n    }\r\n    void draw() {\r\n        ofTranslate(5, 5);\r\n        shader.begin();\r\n        mesh.draw();\r\n        shader.end();\r\n    }\r\n};\r\nint main() {\r\n    ofSetupOpenGL(256+10, 256+10, OF_WINDOW);\r\n    ofRunApp(new ofApp());\r\n}\r\n```\r\n\r\nExpected result (0.8.4, or with ofVboMesh on 0.9.0):\r\n\r\n![expected](https://cloud.githubusercontent.com/assets/157106/7498324/0895603e-f3ee-11e4-9aaf-2f537c872566.png)\r\n\r\nActual result (0.9.0):\r\n\r\n![actual](https://cloud.githubusercontent.com/assets/157106/7498335/12c38978-f3ee-11e4-8419-cc3975d903b6.png)"},"comment":{"url":"https://api.github.com/repos/openframeworks/openFrameworks/issues/comments/130059952","html_url":"https://github.com/openframeworks/openFrameworks/issues/3805#issuecomment-130059952","issue_url":"https://api.github.com/repos/openframeworks/openFrameworks/issues/3805","id":130059952,"user":{"login":"bilderbuchi","id":327442,"avatar_url":"https://avatars.githubusercontent.com/u/327442?v=3","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},"created_at":"2015-08-11T20:37:20Z","updated_at":"2015-08-11T20:37:20Z","body":"is this still occurring in latest master?"}}