Jump to content
  • Advertisement
Sign in to follow this  

Transform Feedback: Stream to various VBOs?

This topic is 3374 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, I want my geometry shader to write different triangles to different vertex buffer objects. Let's say triangles of type 'A' shall land in VBO 'vboA' and triangles of type 'B' in VBO 'vboB'. My idea is to write the vertex positions, texture coordinates and normals of triangles of type 'A' to different output varyings than those of the type 'B' triangles:
// shader:
varying out vec4 vertexPos_A;
varying out vec4 vertexPos_B;
varying out vec3 vertexNormal_A;
varying out vec3 vertexNormal_B;
varying out vec2 textureCoords_A;
varying out vec2 textureCoords_B;

if(triangleType == 'A') {
  vertexPos_A = ...;
  vertexNormal_A = ...;
  textureCoords_A = ...;
} else if(triangleType == 'B') {
  vertexPos_B = ...;
  vertexNormal_B = ...;
  textureCoords_B = ...;
Transform feedback would have to be setup in a way, so that the *_A varyings are streamed to vboA in interleaved mode and the *_B varyings are streamed to vboB in interleaved mode. Reading the transform feedback specs, this cannot be done, am I right? It seems to be possible to stream each of the 6 varyings to different VBOs, so I would end up with 6 VBOs. But 6 VBOs are too many, GL_MAX_TRANSFORM_FEEDBACK_SEPARATE_ATTRIBS_NV is only 4 for my Geforce 8. Is there really no way to stream to more than 1 VBO in interleaved mode? Thanks TiKu

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!