gl_VertexIDinput starts counting from the value given by the
firstparameter of glDrawArrays() and counts upwards one vertex at a time for
- Chapter 2. Our First OpenGL Program
- from OpenGL® SuperBible: Comprehensive Tutorial and Reference, Sixth Edition
- Publisher: Addison-Wesley Professional
- Released: July 2013
SO technically, don't even need any vertex shader inputs / attributes, can use a hardcoded vertex collection, (array or matrix), and use gl_VertexID to get the right vertex position or other attribute for the current vertex being processed.
Share this highlighthttp://www.safaribooksonline.com/a/opengl-superbible-comprehensive/5015/