Andrew
Andrew

Reputation: 14526

Transform feedback vertices always match order of input buffer

After reading Jason Ekstrand's blog on adding the transform feedback extension to Vulkan, he points out that the primitives in the transform feedback buffer aren't guaranteed to reflect the order and count of primitives in the input buffer because of changes made in the geometry and tesselation shaders, and of the use of composite primitives, like GL_TRIANGLE_STRIP.

This makes total sense. But I just wanted to confirm that if:

...then the order of vertices in the transform feedback are guaranteed to match the vertices in the source buffer. For example, culling and clipping would never be an issue in a single transform feedback pass, and also a triangle's front face would be preserved. Am I correct?

Upvotes: 1

Views: 162

Answers (1)

BDL
BDL

Reputation: 22157

The OpenGL wiki states:

Each primitive is written in the order it is given. Within a primitive, the order of the vertex data written is the the vertex order after primitive assembly. This means that, when drawing with triangle strips for example, the captured primitive will switch the order of two vertices every other triangle. This ensures that Face Culling will still respect the ordering provided in the initial array of vertex data.

Upvotes: 1

Related Questions