March 2013
Intermediate to advanced
984 pages
26h 18m
English
To use a instancing in your program
• Create some vertex shader inputs that you intend to be instanced.
• Set the vertex attribute divisors with glVertexAttribDivisor().
• Use the gl_InstanceID built-in variable in the vertex shader.
• Use the instanced versions of the rendering functions such as glDrawArraysInstanced()glDrawElementsInstanced(), or glDrawElementsInstancedBaseVertex().