Reputation: 527
I have a draw buffer and a transform feedback buffer of same length (say, 1000 vertices), but the draw buffer is not contiguous - for example the data I'm interested in is in indexes 0-100 and 900-1000. Now I'd rather not process an extra 800 vertices or make two draw calls, so I use glMultiDraw* to batch the two ranges together. I have yet to find documentation that says if transform feedback will then be similarly populated (with data in indices 0-100 and 900-1000), condensed into a contiguous section (0-100, 101-201), or something else entirely. Does anyone know what happens, or where this behaviour is specified in documentation?
Upvotes: 0
Views: 75
Reputation: 26569
Transform feedback stores primitives. For each primitive that you render in an glBeginTransformFeedback
/glEndTransformFeedback
block, it will write each vertex in it to the bound feedback buffer in sequential order. It has no concept of indices, and primitives generated from more advanced draw modes (GL_LINE_STRIP
, GL_TRIANGLE_STRIP
, etc.) are split up into the most basic primitive types: GL_POINT
, GL_LINE
, and GL_TRIANGLE
.
More reading: https://www.opengl.org/wiki/Transform_Feedback
Upvotes: 0