5
\$\begingroup\$

If you use triangle_adjacency as the input type of a geometry shader, do you need to do something on the client side besides make the primitive mode triangle_adjacency?

Basically what I'm asking do you need to do anything in your application to make the adjacency information available to the geometry shader besides setting the primitive mode in your draw commands?

\$\endgroup\$
5
\$\begingroup\$

Yes. You need to provide the adjacent vertices in the index buffer; they are not generated for you. See this article for the details.

\$\endgroup\$
  • \$\begingroup\$ So are you saying that for instance a line_adjacency type, for each primitive I send I need it to be laid out like I can access in the geometry shader? Meaning vertex 0 would be an adjacent, 1 would be start point of my line, 2 would be endpoint and 3 would be adjacent. So the VBO I submit needs to have this info? \$\endgroup\$ – Joey Green Nov 1 '11 at 20:16
  • \$\begingroup\$ @BobDole Yes, that's right. \$\endgroup\$ – Nathan Reed Nov 1 '11 at 20:46

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.