Take the 2-minute tour ×
Game Development Stack Exchange is a question and answer site for professional and independent game developers. It's 100% free, no registration required.

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
add comment

1 Answer

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
add comment

Your Answer

 
discard

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.