logo
Free, unlimited AI code reviews that run on commit
git-lrc git-lrc GitHub Install Now We'd appreciate a star git-lrc - Free, unlimited AI code reviews that run on commit | Product Hunt git-lrc - Free, unlimited AI code reviews that run on commit | Product Hunt

glBindBufferRange - bind a range within a buffer object to an indexed buffer target

C Specification

voidglBindBufferRange(GLenumtarget,GLuintindex,GLuintbuffer,GLintptroffset,GLsizeiptrsize);

Description

glBindBufferRange binds a range the buffer object buffer represented by offset and size to the binding
       point at index index of the array of targets specified by target. Each target represents an indexed array
       of buffer binding points, as well as a single general binding point that can be used by other buffer
       manipulation functions such as glBindBuffer() or glMapBuffer(). In addition to binding a range of buffer
       to the indexed buffer binding target, glBindBufferRange also binds the range to the generic buffer
       binding point specified by target.

       offset specifies the offset in basic machine units into the buffer object buffer and size specifies the
       amount of data that can be read from the buffer object while used as an indexed target.

Errors

GL_INVALID_ENUM is generated if target is not one of GL_ATOMIC_COUNTER_BUFFER,
       GL_TRANSFORM_FEEDBACK_BUFFER, GL_UNIFORM_BUFFER or GL_SHADER_STORAGE_BUFFER.

       GL_INVALID_VALUE is generated if index is greater than or equal to the number of target-specific indexed
       binding points.

       GL_INVALID_VALUE is generated if size is less than or equal to zero, or if offset + size is greater than
       the value of GL_BUFFER_SIZE.

       Additional errors may be generated if offset violates any target-specific alignmemt restrictions.

Name

       glBindBufferRange - bind a range within a buffer object to an indexed buffer target

Notes

       The GL_ATOMIC_COUNTER_BUFFER target is available only if the GL version is 4.2 or greater.

       The GL_SHADER_STORAGE_BUFFER target is available only if the GL version is 4.3 or greater.

Parameters

target
           Specify the target of the bind operation.  target must be one of GL_ATOMIC_COUNTER_BUFFER,
           GL_TRANSFORM_FEEDBACK_BUFFER, GL_UNIFORM_BUFFER, or GL_SHADER_STORAGE_BUFFER.

       index
           Specify the index of the binding point within the array specified by target.

       buffer
           The name of a buffer object to bind to the specified binding point.

       offset
           The starting offset in basic machine units into the buffer object buffer.

       size
           The amount of data in machine units that can be read from the buffer object while used as an indexed
           target.

See Also

glGenBuffers(), glDeleteBuffers(), glBindBuffer(), glBindBufferBase(), glMapBuffer(), glUnmapBuffer(),

Version Support

       ┌───────────────────┬───────────────────────────────────────────────────────────────────────┐
       │                   │                OpenGLVersion                                         │
       ├───────────────────┼─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┤
       │ Function2.02.13.03.13.23.34.04.14.24.34.44.5 │
       │ /                 │     │     │     │     │     │     │     │     │     │     │     │     │
       │ Feature           │     │     │     │     │     │     │     │     │     │     │     │     │
       │ Name              │     │     │     │     │     │     │     │     │     │     │     │     │
       ├───────────────────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┤
       │ glBindBufferRange │  -  │  -  │  ✔  │  ✔  │  ✔  │  ✔  │  ✔  │  ✔  │  ✔  │  ✔  │  ✔  │  ✔  │
       └───────────────────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┘

See Also