Hi,
I’m trying to poll the state for ‘GL_VERTEX_ATTRIB_ARRAY_DIVISOR_ARB’, which comes from the extension “ARB_instanced_arrays”.
The spec says to use the function ‘GetVertexAttribiv’, but I believe ‘GetVertexAttribiv’ only exists when compiling against 2.1 headers. I’m on Windows at the moment and GL.h does not have that function listed, so I need to know which extension provides the function poll the state.
I thought the extension “EXT_gpu_shader4” might provide the right API entry point to get the state, but glext.h surprisingly does not list all the prototypes that the spec adds. Anyway, the “divisor” is probably not a shader attribute, so this extension is probably not the right one to use.
Can someone tell me how to get the ‘GL_VERTEX_ATTRIB_ARRAY_DIVISOR_ARB’ state on Windows? Thanks for any tips.
I’m unsure what is the 1st parameter (index) to be passed to “glGetVertexAttribivARB”? If that is the right function to use, it would appear as though the ‘divisor’ is actually a vertex attribute.
I had assumed the divisor is not actually an attribute, but maybe it is. I’ll have to get some code together to find out if the divisor shows up when I enumerate all the attributes with “glGetActiveAttribARB”.
Do you think it be listed as one of the attributes so that I can use “glGetVertexAttribivARB” to know the state of the divisor?
I don’t think it’s a vertex attribute, rather it is a property of a vertex attribute. It seems to me that you could set different divisors for say vertex attrib 0 (e.g. position) and vertex attrib 1 (e.g. normal).
So the first argument to glGetVertexAttrib() would be which vertex attrib’s divisor you want to query.