Jump to content

  • Log In with Google      Sign In   
  • Create Account


GLSL Attribute VBO Matching


Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.

  • You cannot reply to this topic
1 reply to this topic

#1 jeffkingdev   Members   -  Reputation: 738

Like
0Likes
Like

Posted 21 November 2012 - 09:26 AM

Hey Guys/Gals:

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.

Thanks
Jeff.

Sponsor:

#2 mhagain   Crossbones+   -  Reputation: 7436

Like
0Likes
Like

Posted 21 November 2012 - 11:02 AM

Yup, that'll work. Unused space in the VBO/vertex struct is just ignored.

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.





Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.



PARTNERS