Jump to content
  • Advertisement
Sign in to follow this  
Vifani

GLSL attribute as buffer object

This topic is 5003 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Hi guys, I want to use a shader attribute as vertex buffer object. Now I use the attribute as follow: shadertexture.glBindAttribLocationARB("tangent",1); shadertexture.glBindAttribLocationARB("binormal",2); glEnableVertexAttribArrayARB(1); glEnableVertexAttribArrayARB(2); glVertexAttribPointerARB(1, 3, true, 0, polygons.vertexTangentArray); glVertexAttribPointerARB(2, 3, true, 0, polygons.vertexBinormalArray); //Draw some the mesh with glDrawElements glDisableVertexAttribArrayARB(1); glDisableVertexAttribArrayARB(2); If I want to use a buffer object for the tangent and binormal arrays, How can I do it?

Share this post


Link to post
Share on other sites
Advertisement
consider how you bind a VBO to vertex positions, texture coords or any other attribute stream, now using that as a starting point it should be easy to see how you bind a VBO to a generic buffer.

Share this post


Link to post
Share on other sites
Quote:
Original post by _the_phantom_
consider how you bind a VBO to vertex positions, texture coords or any other attribute stream, now using that as a starting point it should be easy to see how you bind a VBO to a generic buffer.


Can you make me some examples ?

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!