• Advertisement
Sign in to follow this  

GLSL attribute as buffer object

This topic is 4733 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