OpenGL 4.3 (with the introduction of the ARB_multi_draw_indirect extension) enhanced the ability of OpenGL to allow a large sets of parameters
for indirect draws (introduced with OpenGL 4.0) into a buffer object and dispatch the entire list with one API call. This allows, for example, a shader
(such as a compute shader via shader storage buffers, or a geometry shader via transform feedback) to produce lists of draw commands that can then be
consumed by OpenGL without a server-client round trip. However, when a variable and potentially unknown number of draws are produced by such a shader,
it becomes difficult to know how many draws are in the output array(s). Applications must resort to techniques such as transform feedback primitive
queries, or mapping buffers containing the content of atomic counters, which can cause stalls or bubbles in the OpenGL pipeline.
This extension introduces the concept of the "parameter buffer", which is a target allowing buffers to store parameters for certain drawing commands.
Also in this extension, new variants of MultiDrawArraysIndirect and MultiDrawElementsIndirect are introduced that source some of their
parameters from this buffer. Further commands could potentially be introduced that source other parameters from a buffer.
Requires OpenGL 4..
| Modifier and Type | Field and Description |
|---|---|
| public static final int | GL_PARAMETER_BUFFER_ARB
Accepted by the |
| public static final int | GL_PARAMETER_BUFFER_BINDING_ARB
Accepted by the |
| Access | Constructor and Description |
|---|---|
| protected |
| Modifier and Type | Method and Description | |||
|---|---|---|---|---|
| public static void | glMultiDrawArraysIndirectCountARB(int mode, ByteBuffer
an array of structures containing the draw parameters indirect, long the offset into the parameter buffer object drawcount, int the maximum number of draws maxdrawcount, int the distance in basic machine units between elements of the draw parameter array stride)Behaves similarly to | |||
| public static void | glMultiDrawArraysIndirectCountARB(int mode, long
an array of structures containing the draw parameters indirect, long the offset into the parameter buffer object drawcount, int the maximum number of draws maxdrawcount, int the distance in basic machine units between elements of the draw parameter array stride)Behaves similarly to | |||
| public static void | glMultiDrawArraysIndirectCountARB(int mode, IntBuffer
an array of structures containing the draw parameters indirect, long the offset into the parameter buffer object drawcount, int the maximum number of draws maxdrawcount, int the distance in basic machine units between elements of the draw parameter array stride)Behaves similarly to | |||
| public static void | glMultiDrawArraysIndirectCountARB(int mode, int[] indirect, long drawcount, int maxdrawcount, int stride)
Array version of: | |||
| public static void | glMultiDrawElementsIndirectCountARB(int mode, int
the type of data in the buffer bound to the GL_ELEMENT_ARRAY_BUFFER binding. One of: type, ByteBuffer
a structure containing an array of draw parameters indirect, long the offset into the parameter buffer object drawcount, int the maximum number of draws maxdrawcount, int the distance in basic machine units between elements of the draw parameter array stride)Behaves similarly to | |||
| public static void | glMultiDrawElementsIndirectCountARB(int mode, int
the type of data in the buffer bound to the GL_ELEMENT_ARRAY_BUFFER binding. One of: type, long
a structure containing an array of draw parameters indirect, long the offset into the parameter buffer object drawcount, int the maximum number of draws maxdrawcount, int the distance in basic machine units between elements of the draw parameter array stride)Behaves similarly to | |||
| public static void | glMultiDrawElementsIndirectCountARB(int mode, int
the type of data in the buffer bound to the GL_ELEMENT_ARRAY_BUFFER binding. One of: type, IntBuffer
a structure containing an array of draw parameters indirect, long the offset into the parameter buffer object drawcount, int the maximum number of draws maxdrawcount, int the distance in basic machine units between elements of the draw parameter array stride)Behaves similarly to | |||
| public static void | glMultiDrawElementsIndirectCountARB(int mode, int type, int[] indirect, long drawcount, int maxdrawcount, int stride)
Array version of: | |||
| public static native void | nglMultiDrawArraysIndirectCountARB(int mode, long indirect, long drawcount, int maxdrawcount, int stride)
Unsafe version of: | |||
| public static native void | nglMultiDrawElementsIndirectCountARB(int mode, int type, long indirect, long drawcount, int maxdrawcount, int stride)
Unsafe version of: |
| GL_PARAMETER_BUFFER_ARB | back to summary |
|---|---|
| public static final int GL_PARAMETER_BUFFER_ARB Accepted by the | |
| GL_PARAMETER_BUFFER_BINDING_ARB | back to summary |
|---|---|
| public static final int GL_PARAMETER_BUFFER_BINDING_ARB Accepted by the | |
| ARBIndirectParameters | back to summary |
|---|---|
| protected ARBIndirectParameters() | |
| glMultiDrawArraysIndirectCountARB | back to summary | |||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| public static void glMultiDrawArraysIndirectCountARB(int mode, ByteBuffer indirect, long drawcount, int maxdrawcount, int stride) Behaves similarly to
| ||||||||||||||||
| glMultiDrawArraysIndirectCountARB | back to summary | |||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| public static void glMultiDrawArraysIndirectCountARB(int mode, long indirect, long drawcount, int maxdrawcount, int stride) Behaves similarly to
| ||||||||||||||||
| glMultiDrawArraysIndirectCountARB | back to summary | |||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| public static void glMultiDrawArraysIndirectCountARB(int mode, IntBuffer indirect, long drawcount, int maxdrawcount, int stride) Behaves similarly to
| ||||||||||||||||
| glMultiDrawArraysIndirectCountARB | back to summary |
|---|---|
| public static void glMultiDrawArraysIndirectCountARB(int mode, int[] indirect, long drawcount, int maxdrawcount, int stride) Array version of: | |
| glMultiDrawElementsIndirectCountARB | back to summary | ||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| public static void glMultiDrawElementsIndirectCountARB(int mode, int type, ByteBuffer indirect, long drawcount, int maxdrawcount, int stride) Behaves similarly to
| |||||||||||||||||||
| glMultiDrawElementsIndirectCountARB | back to summary | ||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| public static void glMultiDrawElementsIndirectCountARB(int mode, int type, long indirect, long drawcount, int maxdrawcount, int stride) Behaves similarly to
| |||||||||||||||||||
| glMultiDrawElementsIndirectCountARB | back to summary | ||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| public static void glMultiDrawElementsIndirectCountARB(int mode, int type, IntBuffer indirect, long drawcount, int maxdrawcount, int stride) Behaves similarly to
| |||||||||||||||||||
| glMultiDrawElementsIndirectCountARB | back to summary |
|---|---|
| public static void glMultiDrawElementsIndirectCountARB(int mode, int type, int[] indirect, long drawcount, int maxdrawcount, int stride) Array version of: | |
| nglMultiDrawArraysIndirectCountARB | back to summary |
|---|---|
| public static native void nglMultiDrawArraysIndirectCountARB(int mode, long indirect, long drawcount, int maxdrawcount, int stride) Unsafe version of: | |
| nglMultiDrawElementsIndirectCountARB | back to summary |
|---|---|
| public static native void nglMultiDrawElementsIndirectCountARB(int mode, int type, long indirect, long drawcount, int maxdrawcount, int stride) Unsafe version of: | |