drawElements
robustness is currently ensured by checking
indices in the element array buffer against the size of the array buffer
they are indexing. These checks are undesirable from a performance
perspective, since they introduce CPU overhead to the API and require index
buffers to have a copy in CPU-accessible memory.
This extension changes the behavior of drawElements
to use
security features built into hardware, bypassing the CPU-side range check
and improving performance. The drawback is that if out-of-range indices are
referenced by drawElements
, no error is generated and the
rendering results of that call will be undefined. However, supplying
out-of-range indices to drawElements
will not result in
reading vertex data from outside the enabled vertex buffer objects, nor
abnormal program termination, as specified in the OpenGL extension
ARB_robust_buffer_access_behavior.
It is suggested that this extension is left disabled when debugging. Any
INVALID_OPERATION
errors from drawElements
seen
while the extension is off mean that the application is supplying incorrect
indices to the API, even if rendering results would seem correct when this
extension is enabled.
This extension interacts with ANGLE_instanced_arrays.
drawElements
will not produce an INVALID_OPERATION
error if a referenced index lies outside the storage of the bound buffer. Instead,
rendering is performed and attribute indices that are outside the valid range will produce
undefined rendering results.
drawElementsInstancedANGLE
will not produce an INVALID_OPERATION
error if a referenced index
lies outside the storage of the bound buffer, but will instead produce undefined
rendering results similarly to drawElements
.