cameni
03-11-2010, 12:08 AM
Hi,
Calling glDrawArrays(mode,first,count) with non-zero first parameter behaves differently on ATI/Nvidia with respect to the gl_VertexID built-in variable. On Nvidia, the gl_VertexID contains the values from first to first+count, but on ATI the indices always start from zero.
I'm not sure what is the correct behavior. The specification says only that "gl_VertexID holds the integer index i implicitly passed by DrawArrays or one of the other drawing commands ..". As far as I can see it doesn't explicitly say what the indices should be with respect to the value of first.
Can anyone tell what should be the correct interpretation?
Thanks.
PS: Tested with mode=GL_POINTS, Nvidia 196.21 driver and ATI 10.2 driver.
Calling glDrawArrays(mode,first,count) with non-zero first parameter behaves differently on ATI/Nvidia with respect to the gl_VertexID built-in variable. On Nvidia, the gl_VertexID contains the values from first to first+count, but on ATI the indices always start from zero.
I'm not sure what is the correct behavior. The specification says only that "gl_VertexID holds the integer index i implicitly passed by DrawArrays or one of the other drawing commands ..". As far as I can see it doesn't explicitly say what the indices should be with respect to the value of first.
Can anyone tell what should be the correct interpretation?
Thanks.
PS: Tested with mode=GL_POINTS, Nvidia 196.21 driver and ATI 10.2 driver.