Game Development Stack Exchange is a question and answer site for professional and independent game developers. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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?

share|improve this question
up vote 5 down vote accepted

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

share|improve this answer
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? – Joey Green Nov 1 '11 at 20:16
@BobDole Yes, that's right. – Nathan Reed Nov 1 '11 at 20:46

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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