Regarding glew 1.7.0 (and maybe earlier versions??):
The code that does the GetProcAddress lookup for glDrawArraysInstancedARB and glDrawElementsInstancedARB is misplaced in the _glewInit_GL_ARB_instanced_arrays() function.
So if GL_ARB_instanced_arrays is not supported by the GL, the glDrawArrays/ElementsARB function pointers are never initialized and
we crash when trying to call them.
The attached patch fixes the glew.c file which we have in piglit. You can easily adapt it for your glew tree. Is there a generator script for this file?
patch, as taken from the piglit project.
Indeed. Seems off that these would be grouped into ARB_instanced_arrays rather than ARB_draw_instanced.
http://www.opengl.org/registry/specs/ARB/instanced_arrays.txt
The instanced_arrays spec includes the following:
So GLEW needs to initialize these two functions pointers iff GL_ARB_instanced_arrays or GL_ARB_draw_instanced is available.