Khronos public bugtracker – Bug 1480
glDrawRangeElementsBaseVertex specification makes no sense (typo/copy-paste errors?)
Last modified: 2016-04-14 09:16:37 PDT
The spec says for glDrawRangeElementsBaseVertex (10.4, p355): "For DrawRangeElementsBaseVertex, the values taken from indices for each element transferred must be in the range [start;end], prior to adding the basevertex offset." ... which is ok, but it then goes on immediately to say: "Index values lying outside this range are treated in the same way as DrawRangeElements" ... which makes no sense. It just said the index values *must* be *inside* the range, and then specified a behavior for values *outside* the range. I think that the above quoted sentence should actually say "inside" instead of "outside". The man page, here: https://www.opengl.org/sdk/docs/man/html/glDrawRangeElementsBaseVertex.xhtml ... replicates this error, and also contains a second error: "glDrawRangeElementsBaseVertex is a restricted form of glDrawElementsBaseVertex. mode, start, end, count and basevertex match the corresponding arguments to glDrawElementsBaseVertex" - but glDrawElementsBaseIndex has no _start_ or _end_ arguments. I think _start_ and _end_ should be removed from the list in the quoted statement, and replaced with _type_ and _count_ which *are* arguments to glDrawElementsBaseVertex.
The manpage for glDrawElements (https://www.opengl.org/sdk/docs/man/html/glDrawElements.xhtml) has a similar issue: "mode, start, end, and count match the corresponding arguments to glDrawElements" - but there are no _start_ or _end_ arguments to dlDrawElements.
(In reply to Davin McCall from comment #0) > The spec says for glDrawRangeElementsBaseVertex (10.4, p355): > > "For DrawRangeElementsBaseVertex, the values taken from > indices for each element transferred must be in the range [start;end], prior > to adding the basevertex offset." > > ... which is ok, but it then goes on immediately to say: > > "Index values lying outside this range are treated in the same way as > DrawRangeElements" > > ... which makes no sense. It just said the index values *must* be *inside* > the range, and then specified a behavior for values *outside* the range. I > think that the above quoted sentence should actually say "inside" instead of > "outside". No, I believe this means exactly what it says: - You get well-defined behaviour if the index values are inside the [start, end] range. - If your values are outside the range, you get the same kind of implementation-dependent behaviour as is specified for DrawRangeElements, which you can find if you scroll back about the spec about 1/2 a page. In particular it says: "DrawRangeElements is a restricted form of DrawElements. mode, count, type, and indices match the corresponding arguments to DrawElements, with the additional constraint that all index values identified by indices must lie between start and end inclusive." And in the accompanying Errors box it says: "It is an error for index values (other than the primitive restart index, when primitive restart is enabled) to lie outside the range [start,end], but implementations are not required to check for this. Such indices will cause implementation-dependent behavior."
(In reply to Davin McCall from comment #0) > The man page, here: > https://www.opengl.org/sdk/docs/man/html/glDrawRangeElementsBaseVertex.xhtml > > ... replicates this error, Per my above comment, I believe that part is correct. > and also contains a second error: > > "glDrawRangeElementsBaseVertex is a restricted form of > glDrawElementsBaseVertex. mode, start, end, count and basevertex match the > corresponding arguments to glDrawElementsBaseVertex" > > - but glDrawElementsBaseIndex has no _start_ or _end_ arguments. I think > _start_ and _end_ should be removed from the list in the quoted statement, > and replaced with _type_ and _count_ which *are* arguments to > glDrawElementsBaseVertex. Agree this is an error. It should say: "glDrawRangeElementsBaseVertex is a restricted form of glDrawElementsBaseVertex. mode, count, type, indices, and basevertex match the corresponding arguments to ^^^^^^^^^^^^^^^^^^^^^^^^^^^ glDrawElementsBaseVertex, with the additional constraint that all values in the array indices must lie between start and end, inclusive, prior to adding basevertex. Index values lying outside the range [start, end] are treated in the same way as glDrawRangeElements. The ith element transferred by the corresponding draw call will ^^^^^^^^^^^^^^^^^^^ be taken from element indices[i] + basevertex of each enabled array. If the resulting value is larger than the maximum value representable by type, it is as if the calculation were upconverted to 32-bit unsigned integers (with wrapping on overflow conditions). The operation is undefined if the sum would be negative."
(In reply to Davin McCall from comment #1) > The manpage for glDrawElements > (https://www.opengl.org/sdk/docs/man/html/glDrawElements.xhtml) has a > similar issue: > > "mode, start, end, and count match the corresponding arguments to > glDrawElements" - but there are no _start_ or _end_ arguments to > dlDrawElements. I don't see this text (or anything similar) on this page.
Discussed in the meeting today. Assigned to Graham to tweak the man pages as per comment #3.
> I don't see this text (or anything similar) on this page. Sorry, wrong link. It should be: https://www.opengl.org/sdk/docs/man/html/glDrawRangeElements.xhtml