GLSL Attribute VBO Matching
Members - Reputation: 701
Posted 21 November 2012 - 09:26 AM
I got a quick question regarding GLSL. If I have a shader who's inputs only take position/texture and bind those to attribute id's 0 for position and 1 for texture. If my VBO is interleaved with position/normal/texture... that should be ok assuming I match the vertex pointers up correctly binding attribute 0 to position + 0 offset and a size of my structure and bind attribute 1 to texture + texOffset and a size of my structure right?
Another words, it shouldn't matter that normals are in my VBO even though the shader doesn't use it, correct?
I'm pretty sure of this answer.
Crossbones+ - Reputation: 6292
Posted 21 November 2012 - 11:02 AM
It appears that the gentleman thought C++ was extremely difficult and he was overjoyed that the machine was absorbing it; he understood that good C++ is difficult but the best C++ is well-nigh unintelligible.