Tell me more ×
Game Development Stack Exchange is a question and answer site for professional and independent game developers. It's 100% free, no registration required.

A shader has values that are per vextex and values that are per call.

Can you have values that vary only per triangle or quad

And can you have values that vary only per pair. Of indicies in a glmultielementsdraw or equiv?

share|improve this question
Maybe you can use glVertexAttribDivisor: opengl.org/sdk/docs/man4/xhtml/glVertexAttribDivisor.xml- but I don't know, if it will work with ordinary draw commands (without instanced drawing). – zacharmarz May 22 '11 at 11:12
@zacharmarz that ought to go in an answer so it can be enlarged upon; it looks promising, I hadn't seen that before; it would require all bits I drew to be the same size, of course, but using it to give different transform for each unit and draw an army of the same unit, then it might be great! – Will May 23 '11 at 6:42

Know someone who can answer? Share a link to this question via email, Google+, Twitter, or Facebook.

Your Answer

 
discard

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

Browse other questions tagged or ask your own question.