PDA

View Full Version : OpenGL 3.2 - Guaranteed order for gl_InstanceID



Madsy
11-06-2009, 12:27 PM
I find both the OpenGL 3.2 specification and the GLSL 1.50 specification a bit unclear on the gl_InstanceID variable. Is it guaranteed that this counter increases with 1 for each instance? That is, is the sequence guaranteed to be ordered such that 0 comes before 1, 1 comes before 2, ad finitum?
Except for my results, the only wording in the spec which supports this is the psuedo-for-loop-code in the OpenGL 3.2 specification, section 8.2, which demonstrates how DrawArraysInstanced correlates to several calls to DrawArrays. (other draw calls including)

Alfonse Reinheart
11-06-2009, 01:01 PM
Yes, it is guaranteed.

Brolingstanz
11-07-2009, 08:23 AM
Is it me or is there no glMultiDrawElementsInstancecdBaseVertex?
-- anonymous

Alfonse Reinheart
11-07-2009, 01:18 PM
Why would there be? MultiDraw and Instancing are used in two completely different places for two completely different things. There is MultiDraw with BaseVertex and Instancing with BaseVertex. But there's no need for both.