{"action":"opened","issue":{"url":"https://api.github.com/repos/java-opengl-labs/jogl-samples/issues/41","repository_url":"https://api.github.com/repos/java-opengl-labs/jogl-samples","labels_url":"https://api.github.com/repos/java-opengl-labs/jogl-samples/issues/41/labels{/name}","comments_url":"https://api.github.com/repos/java-opengl-labs/jogl-samples/issues/41/comments","events_url":"https://api.github.com/repos/java-opengl-labs/jogl-samples/issues/41/events","html_url":"https://github.com/java-opengl-labs/jogl-samples/issues/41","id":210121705,"number":41,"title":"Problem with glBindAttribLocation with es_200","user":{"login":"NicoKiaru","id":20223054,"avatar_url":"https://avatars.githubusercontent.com/u/20223054?v=3","gravatar_id":"","url":"https://api.github.com/users/NicoKiaru","html_url":"https://github.com/NicoKiaru","followers_url":"https://api.github.com/users/NicoKiaru/followers","following_url":"https://api.github.com/users/NicoKiaru/following{/other_user}","gists_url":"https://api.github.com/users/NicoKiaru/gists{/gist_id}","starred_url":"https://api.github.com/users/NicoKiaru/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/NicoKiaru/subscriptions","organizations_url":"https://api.github.com/users/NicoKiaru/orgs","repos_url":"https://api.github.com/users/NicoKiaru/repos","events_url":"https://api.github.com/users/NicoKiaru/events{/privacy}","received_events_url":"https://api.github.com/users/NicoKiaru/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2017-02-24T18:22:05Z","updated_at":"2017-02-24T18:22:05Z","closed_at":null,"body":"Hello, \r\n\r\nI have a hard time trying to customize shaders with es_200 (I don't want to go above for compatibility reasons). In fact I noticed that changing on line 108 of Es_200_draw_elements.java (https://github.com/java-opengl-labs/jogl-samples/blob/master/jogl-samples/src/tests/es_200/Es_200_draw_elements.java) the line:\r\n\r\n`gl2es2.glBindAttribLocation(programName, Semantic.Attr.POSITION, \"position\");`\r\n\r\nto \r\n\r\n`gl2es2.glBindAttribLocation(programName, Semantic.Attr.POSITION, \"pouetpouet\");`\r\n\r\nor whatever gibberish as string do not have any effect : both are working well. That's weird. I do not understand why. \r\n\r\nSomething also weird, if I change the vertex shader flat_color.vert from:\r\n\r\nuniform mat4 mvp;\r\nattribute highp vec4 position;\r\nvoid main()\r\n{\r\ngl_Position = mvp * position;\r\n}\r\n\r\nto \r\n\r\nuniform mat4 mvp;\r\nattribute highp vec4 positionwhatever;\r\nvoid main()\r\n{\t\r\n    gl_Position = mvp * positionwhatever;\r\n}\r\n\r\nThis works as well (keep \"position\" in the java code)... But how opengl is able to find and link the correct position variable ?... I'm really confused. \r\n\r\nOn the contrary the link with Uniforms is working as expected and consistent : for instance I need to change \"mvp\" both in the shader and in the java code. But what's the deal with glBindAttribLocation ?\r\n\r\nThanks for any help..."}}
{"actor":{"display_login":"NicoKiaru"}}