Transform Feedback Buffer /w glDrawElements

Hello all,

I really have a quick question about the possibility of using the output buffer from a transform feedback operation with glDrawElements function.

I am drawing a mesh by using glDrawElements and everything renders as expected. Things start to break when I enable the transform feedback and try to render the output buffer with glDrawElements function. As you can guess mesh topology seems to be broken down.

Now, as I understand, even though transform feedback can capture data from glDrawElements without a problem, (I checked with queries) we cannot use the output buffer directly in the same way as we use in glDrawElements, because the vertices are not recorded in the same order anymore.

Am I correct? Is there a way to use the same glDrawElements function call with the output of transform feedback (which I don’t expect naturally due to the parallel nature)?

I assume, finally I will end up reorganizing mesh data to make it usable with glDrawArrays function, which will end up with increased storage…

Am I correct? Is there a way to use the same glDrawElements function call with the output of transform feedback (which I don’t expect naturally due to the parallel nature)?

No. That’s not what transform feedback does. It captures the triangles emitted from a draw call. Not the vertices.

Just use glDrawElements on the first pass, then glDrawArrays on the second.

Well, i did not say it was capturing vertices : )

Ok. One more script in the pipeline to convert from indexed access scheme. Thanks!