GL 4.6 compatibility spec is self contradictory about primitive restart and ArrayElement
Section 10.7.4 (Transferring Vertices With ArrayElement) says:
If
ArrayElementis called while primitive restart is enabled (see section 10.3.6 and i is equal to the primitive restart index, then no vertex data is dereferenced, and no current vertex state is modified. Instead, it is as ifEndwere called, followed by a call toBeginwhere mode is the same as the mode used by the previousBegin.
But section 10.3.6 (Primitive Restart) says;
Note that primitive restart is not performed for array elements transferred by any drawing command not taking a type parameter, including
ArrayElementand all of the*Draw*commands other than*DrawElements*.
- Is
glArrayElementsubject to primitive restart or not? The two spec quotations say the opposite thing. - Is
glDrawRangeElementssubject to primitive restart or not? Section 10.3.6 seems to exclude it, but I doubt that was intended.
The etymology of the 10.3.6 paragraph is interesting, as the quirk appears to have arisen between 4.4 and 4.5.
In 4.4, the sentence was specifically about the fixed-index form:
If
PRIMITIVE_RESTART_FIXED_INDEXis enabled, primitive restart is not performed for array elements transferred by any drawing command not taking a type parameter, includingArrayElementand all of the*Draw*commands other than*DrawElements*.
This makes sense, as the fixed index is defined in terms of the type provided, and functions that provide no such type could use it.
But in 4.5, it was separated from the previous sentence into its own paragraph and expanded, essentially as you quoted.
It seems that all versions of the fixed-index restart have the "I don't care about DrawRange functions" issue, including the actual extension specification that brought it up. This makes sense, as it was part of ES3 compatibility, and ES doesn't have the range drawing functions.
That being said, the change of paragraph from 4.4 to 4.5 may have been to address the question of what restarting means for array rendering. This is important, because restarting is based on the vertex ID at vertex reading time, and both indexed and array rendering functions have those. In 4.5 core, the paragraph says that array drawing functions don't provoke any restarting, even if the vertex ID happens to equal the fixed or specified index.