This extension adds a few new features designed to provide very low overhead batching and replay of rendering commands and state changes:
Because state objects reflect the state of the entire pipeline, it is expected that they can be pre-validated and executed efficiently. It is also expected that when state objects are combined into a command list, the command list can diff consecutive state objects to produce a reduced/ optimized set of state changes specific to that transition.
The token-based command stream can also be stored in regular buffer objects and therefore be modified by the server itself. This allows more complex work creation than the original MDI approach, which was limited to emitting draw calls only.
typedef struct {
uint header;
} TerminateSequenceCommandNV;
typedef struct {
uint header;
} NOPCommandNV;
typedef struct {
uint header;
uint count;
uint firstIndex;
uint baseVertex;
} DrawElementsCommandNV;
typedef struct {
uint header;
uint count;
uint first;
} DrawArraysCommandNV;
typedef struct {
uint header;
uint mode;
uint count;
uint instanceCount;
uint firstIndex;
uint baseVertex;
uint baseInstance;
} DrawElementsInstancedCommandNV;
typedef struct {
uint header;
uint mode;
uint count;
uint instanceCount;
uint first;
uint baseInstance;
} DrawArraysInstancedCommandNV;
typedef struct {
uint header;
uint addressLo;
uint addressHi;
uint typeSizeInByte;
} ElementAddressCommandNV;
typedef struct {
uint header;
uint index;
uint addressLo;
uint addressHi;
} AttributeAddressCommandNV;
typedef struct {
uint header;
ushort index;
ushort stage;
uint addressLo;
uint addressHi;
} UniformAddressCommandNV;
typedef struct {
uint header;
float red;
float green;
float blue;
float alpha;
} BlendColorCommandNV;
typedef struct {
uint header;
uint frontStencilRef;
uint backStencilRef;
} StencilRefCommandNV;
typedef struct {
uint header;
float lineWidth;
} LineWidthCommandNV;
typedef struct {
uint header;
float scale;
float bias;
} PolygonOffsetCommandNV;
typedef struct {
uint header;
float alphaRef;
} AlphaRefCommandNV;
typedef struct {
uint header;
uint x;
uint y;
uint width;
uint height;
} ViewportCommandNV; // only ViewportIndex 0
typedef struct {
uint header;
uint x;
uint y;
uint width;
uint height;
} ScissorCommandNV; // only ViewportIndex 0
typedef struct {
uint header;
uint frontFace; // 0 for CW, 1 for CCW
} FrontFaceCommandNV;
Tight packing is used for all structures.
| Modifier and Type | Field and Description |
|---|---|
| public static final int | GL_ALPHA_REF_COMMAND_NV
Used in DrawCommandsStates buffer formats, in GetCommandHeaderNV to return the header. |
| public static final int | GL_ATTRIBUTE_ADDRESS_COMMAND_NV
Used in DrawCommandsStates buffer formats, in GetCommandHeaderNV to return the header. |
| public static final int | GL_BLEND_COLOR_COMMAND_NV
Used in DrawCommandsStates buffer formats, in GetCommandHeaderNV to return the header. |
| public static final int | GL_DRAW_ARRAYS_COMMAND_NV
Used in DrawCommandsStates buffer formats, in GetCommandHeaderNV to return the header. |
| public static final int | GL_DRAW_ARRAYS_INSTANCED_COMMAND_NV
Used in DrawCommandsStates buffer formats, in GetCommandHeaderNV to return the header. |
| public static final int | GL_DRAW_ARRAYS_STRIP_COMMAND_NV
Used in DrawCommandsStates buffer formats, in GetCommandHeaderNV to return the header. |
| public static final int | GL_DRAW_ELEMENTS_COMMAND_NV
Used in DrawCommandsStates buffer formats, in GetCommandHeaderNV to return the header. |
| public static final int | GL_DRAW_ELEMENTS_INSTANCED_COMMAND_NV
Used in DrawCommandsStates buffer formats, in GetCommandHeaderNV to return the header. |
| public static final int | GL_DRAW_ELEMENTS_STRIP_COMMAND_NV
Used in DrawCommandsStates buffer formats, in GetCommandHeaderNV to return the header. |
| public static final int | GL_ELEMENT_ADDRESS_COMMAND_NV
Used in DrawCommandsStates buffer formats, in GetCommandHeaderNV to return the header. |
| public static final int | GL_FRONT_FACE_COMMAND_NV
Used in DrawCommandsStates buffer formats, in GetCommandHeaderNV to return the header. |
| public static final int | GL_LINE_WIDTH_COMMAND_NV
Used in DrawCommandsStates buffer formats, in GetCommandHeaderNV to return the header. |
| public static final int | GL_NOP_COMMAND_NV
Used in DrawCommandsStates buffer formats, in GetCommandHeaderNV to return the header. |
| public static final int | GL_POLYGON_OFFSET_COMMAND_NV
Used in DrawCommandsStates buffer formats, in GetCommandHeaderNV to return the header. |
| public static final int | GL_SCISSOR_COMMAND_NV
Used in DrawCommandsStates buffer formats, in GetCommandHeaderNV to return the header. |
| public static final int | GL_STENCIL_REF_COMMAND_NV
Used in DrawCommandsStates buffer formats, in GetCommandHeaderNV to return the header. |
| public static final int | GL_TERMINATE_SEQUENCE_COMMAND_NV
Used in DrawCommandsStates buffer formats, in GetCommandHeaderNV to return the header. |
| public static final int | GL_UNIFORM_ADDRESS_COMMAND_NV
Used in DrawCommandsStates buffer formats, in GetCommandHeaderNV to return the header. |
| public static final int | GL_VIEWPORT_COMMAND_NV
Used in DrawCommandsStates buffer formats, in GetCommandHeaderNV to return the header. |
| Access | Constructor and Description |
|---|---|
| protected |
| Modifier and Type | Method and Description | |||||||
|---|---|---|---|---|---|---|---|---|
| public static native void | glCallCommandListNV(int
the command list to call list)Executes the command list indicated by | |||||||
| public static native void | glCommandListSegmentsNV(int
the command list list, int the number of ordered sequences of commands segments)Indicates that | |||||||
| public static native void | glCompileCommandListNV(int
the command list to compile list)Makes the list indicated by | |||||||
| public static void | glCreateCommandListsNV(IntBuffer
the buffer in which to return the created command list names lists)Returns | |||||||
| public static int | glCreateCommandListsNV()
Returns | |||||||
| public static void | ||||||||
| public static void | glCreateStatesNV(IntBuffer
the buffer in which to write the created state object names states)Returns | |||||||
| public static int | glCreateStatesNV()
Returns | |||||||
| public static void | ||||||||
| public static void | glDeleteCommandListsNV(IntBuffer
the buffer from which to read the command list names to delete lists)Deletes | |||||||
| public static void | ||||||||
| public static void | ||||||||
| public static void | glDeleteStatesNV(IntBuffer
the buffer from which to read the state object names to delete states)Deletes | |||||||
| public static void | ||||||||
| public static void | ||||||||
| public static void | glDrawCommandsAddressNV(int
the primitive mode primitiveMode, LongBuffer the array of GPU addreses indirects, IntBuffer the array of command lengths sizes)Accepts arrays of buffer addresses as an array of GPU addresses | |||||||
| public static void | glDrawCommandsAddressNV(int primitiveMode, long[] indirects, int[] sizes)
Array version of: | |||||||
| public static void | glDrawCommandsNV(int
the primitive mode primitiveMode, int the buffer object name buffer, PointerBuffer the array of offsets into the buffer indirects, IntBuffer the array of command lengths sizes)Accepts arrays of buffer addresses as an array of offsets | |||||||
| public static void | glDrawCommandsNV(int primitiveMode, int buffer, PointerBuffer indirects, int[] sizes)
Array version of: | |||||||
| public static void | glDrawCommandsStatesAddressNV(LongBuffer
the array of GPU addresses indirects, IntBuffer the array of command lengths sizes, IntBuffer the array of state object names states, IntBuffer the array of framebuffer object names fbos)Accepts arrays of buffer addresses as an array of GPU addresses | |||||||
| public static void | glDrawCommandsStatesAddressNV(long[] indirects, int[] sizes, int[] states, int[] fbos)
Array version of: | |||||||
| public static void | glDrawCommandsStatesNV(int
the buffer object name buffer, PointerBuffer the array of offsets into the buffer indirects, IntBuffer the array of command lengths sizes, IntBuffer the array of state object names states, IntBuffer the array of framebuffer object names fbos)Accepts arrays of buffer addresses as an array of offsets | |||||||
| public static void | glDrawCommandsStatesNV(int buffer, PointerBuffer indirects, int[] sizes, int[] states, int[] fbos)
Array version of: | |||||||
| public static native int | glGetCommandHeaderNV(int
the command to query. One of: tokenID, int provided as basic consistency check, since the size of each structure is fixed and no padding is allowed. The value is the sum of the header and
the command specific structure. size)Returns the encoded 32bit header value for a given command; the returned value is implementation specific. | |||||||
| public static native short | glGetStageIndexNV(int
the shader stage type shadertype)Returns the 16bit value for a specific shader stage; the returned value is implementation specific. | |||||||
| public static native boolean | glIsCommandListNV(int
the object name to query list)Returns true if the specified name corresponds to a command list. | |||||||
| public static native boolean | glIsStateNV(int
the object name to test state)Returns true if the specified name corresponds to a state object. | |||||||
| public static void | glListDrawCommandsStatesClientNV(int
the command list list, int the segment segment, PointerBuffer the array of GPU addresses indirects, IntBuffer the array of command lengths sizes, IntBuffer the array of state object names states, IntBuffer the array of framebuffer object names fbos)A list has multiple segments and each segment enqueues an ordered list of commands. | |||||||
| public static void | glListDrawCommandsStatesClientNV(int list, int segment, PointerBuffer indirects, int[] sizes, int[] states, int[] fbos)
Array version of: | |||||||
| public static native void | glStateCaptureNV(int
the state object into which to capture the current rendering state state, int the basic Begin mode that this state object must be used with. One of: mode)
Captures the current state of the rendering pipeline into the object indicated by | |||||||
| public static native void | nglCreateCommandListsNV(int
the number of command list names to create n, long lists)Unsafe version of: | |||||||
| public static native void | nglCreateStatesNV(int
the number of state object names to create n, long states)Unsafe version of: | |||||||
| public static native void | nglDeleteCommandListsNV(int
the number of command list names to delete n, long lists)Unsafe version of: | |||||||
| public static native void | nglDeleteStatesNV(int
the number of state object names to delete n, long states)Unsafe version of: | |||||||
| public static native void | nglDrawCommandsAddressNV(int primitiveMode, long indirects, long sizes, int
the number of commands count)Unsafe version of: | |||||||
| public static native void | nglDrawCommandsNV(int primitiveMode, int buffer, long indirects, long sizes, int
the number of commands count)Unsafe version of: | |||||||
| public static native void | nglDrawCommandsStatesAddressNV(long indirects, long sizes, long states, long fbos, int
the number of commands count)Unsafe version of: | |||||||
| public static native void | nglDrawCommandsStatesNV(int buffer, long indirects, long sizes, long states, long fbos, int
the number of commands count)Unsafe version of: | |||||||
| public static native void | nglListDrawCommandsStatesClientNV(int list, int segment, long indirects, long sizes, long states, long fbos, int
the number of commands count)Unsafe version of: |
| GL_ALPHA_REF_COMMAND_NV | back to summary |
|---|---|
| public static final int GL_ALPHA_REF_COMMAND_NV Used in DrawCommandsStates buffer formats, in GetCommandHeaderNV to return the header. | |
| GL_ATTRIBUTE_ADDRESS_COMMAND_NV | back to summary |
|---|---|
| public static final int GL_ATTRIBUTE_ADDRESS_COMMAND_NV Used in DrawCommandsStates buffer formats, in GetCommandHeaderNV to return the header. | |
| GL_BLEND_COLOR_COMMAND_NV | back to summary |
|---|---|
| public static final int GL_BLEND_COLOR_COMMAND_NV Used in DrawCommandsStates buffer formats, in GetCommandHeaderNV to return the header. | |
| GL_DRAW_ARRAYS_COMMAND_NV | back to summary |
|---|---|
| public static final int GL_DRAW_ARRAYS_COMMAND_NV Used in DrawCommandsStates buffer formats, in GetCommandHeaderNV to return the header. | |
| GL_DRAW_ARRAYS_INSTANCED_COMMAND_NV | back to summary |
|---|---|
| public static final int GL_DRAW_ARRAYS_INSTANCED_COMMAND_NV Used in DrawCommandsStates buffer formats, in GetCommandHeaderNV to return the header. | |
| GL_DRAW_ARRAYS_STRIP_COMMAND_NV | back to summary |
|---|---|
| public static final int GL_DRAW_ARRAYS_STRIP_COMMAND_NV Used in DrawCommandsStates buffer formats, in GetCommandHeaderNV to return the header. | |
| GL_DRAW_ELEMENTS_COMMAND_NV | back to summary |
|---|---|
| public static final int GL_DRAW_ELEMENTS_COMMAND_NV Used in DrawCommandsStates buffer formats, in GetCommandHeaderNV to return the header. | |
| GL_DRAW_ELEMENTS_INSTANCED_COMMAND_NV | back to summary |
|---|---|
| public static final int GL_DRAW_ELEMENTS_INSTANCED_COMMAND_NV Used in DrawCommandsStates buffer formats, in GetCommandHeaderNV to return the header. | |
| GL_DRAW_ELEMENTS_STRIP_COMMAND_NV | back to summary |
|---|---|
| public static final int GL_DRAW_ELEMENTS_STRIP_COMMAND_NV Used in DrawCommandsStates buffer formats, in GetCommandHeaderNV to return the header. | |
| GL_ELEMENT_ADDRESS_COMMAND_NV | back to summary |
|---|---|
| public static final int GL_ELEMENT_ADDRESS_COMMAND_NV Used in DrawCommandsStates buffer formats, in GetCommandHeaderNV to return the header. | |
| GL_FRONT_FACE_COMMAND_NV | back to summary |
|---|---|
| public static final int GL_FRONT_FACE_COMMAND_NV Used in DrawCommandsStates buffer formats, in GetCommandHeaderNV to return the header. | |
| GL_LINE_WIDTH_COMMAND_NV | back to summary |
|---|---|
| public static final int GL_LINE_WIDTH_COMMAND_NV Used in DrawCommandsStates buffer formats, in GetCommandHeaderNV to return the header. | |
| GL_NOP_COMMAND_NV | back to summary |
|---|---|
| public static final int GL_NOP_COMMAND_NV Used in DrawCommandsStates buffer formats, in GetCommandHeaderNV to return the header. | |
| GL_POLYGON_OFFSET_COMMAND_NV | back to summary |
|---|---|
| public static final int GL_POLYGON_OFFSET_COMMAND_NV Used in DrawCommandsStates buffer formats, in GetCommandHeaderNV to return the header. | |
| GL_SCISSOR_COMMAND_NV | back to summary |
|---|---|
| public static final int GL_SCISSOR_COMMAND_NV Used in DrawCommandsStates buffer formats, in GetCommandHeaderNV to return the header. | |
| GL_STENCIL_REF_COMMAND_NV | back to summary |
|---|---|
| public static final int GL_STENCIL_REF_COMMAND_NV Used in DrawCommandsStates buffer formats, in GetCommandHeaderNV to return the header. | |
| GL_TERMINATE_SEQUENCE_COMMAND_NV | back to summary |
|---|---|
| public static final int GL_TERMINATE_SEQUENCE_COMMAND_NV Used in DrawCommandsStates buffer formats, in GetCommandHeaderNV to return the header. | |
| GL_UNIFORM_ADDRESS_COMMAND_NV | back to summary |
|---|---|
| public static final int GL_UNIFORM_ADDRESS_COMMAND_NV Used in DrawCommandsStates buffer formats, in GetCommandHeaderNV to return the header. | |
| GL_VIEWPORT_COMMAND_NV | back to summary |
|---|---|
| public static final int GL_VIEWPORT_COMMAND_NV Used in DrawCommandsStates buffer formats, in GetCommandHeaderNV to return the header. | |
| NVCommandList | back to summary |
|---|---|
| protected NVCommandList() | |
| glCallCommandListNV | back to summary |
|---|---|
| public static native void glCallCommandListNV(int list) Executes the command list indicated by
| |
| glCommandListSegmentsNV | back to summary |
|---|---|
| public static native void glCommandListSegmentsNV(int list, int segments) Indicates that
| |
| glCompileCommandListNV | back to summary |
|---|---|
| public static native void glCompileCommandListNV(int list) Makes the list indicated by
| |
| glCreateCommandListsNV | back to summary |
|---|---|
| public static void glCreateCommandListsNV(IntBuffer lists) Returns
| |
| glCreateCommandListsNV | back to summary |
|---|---|
| public static int glCreateCommandListsNV() Returns
| |
| glCreateCommandListsNV | back to summary |
|---|---|
| public static void glCreateCommandListsNV(int[] lists) Array version of: | |
| glCreateStatesNV | back to summary |
|---|---|
| public static void glCreateStatesNV(IntBuffer states) Returns
| |
| glCreateStatesNV | back to summary |
|---|---|
| public static int glCreateStatesNV() Returns
| |
| glCreateStatesNV | back to summary |
|---|---|
| public static void glCreateStatesNV(int[] states) Array version of: | |
| glDeleteCommandListsNV | back to summary |
|---|---|
| public static void glDeleteCommandListsNV(IntBuffer lists) Deletes
| |
| glDeleteCommandListsNV | back to summary |
|---|---|
| public static void glDeleteCommandListsNV(int list) Deletes | |
| glDeleteCommandListsNV | back to summary |
|---|---|
| public static void glDeleteCommandListsNV(int[] lists) Array version of: | |
| glDeleteStatesNV | back to summary |
|---|---|
| public static void glDeleteStatesNV(IntBuffer states) Deletes
| |
| glDeleteStatesNV | back to summary |
|---|---|
| public static void glDeleteStatesNV(int state) Deletes | |
| glDeleteStatesNV | back to summary |
|---|---|
| public static void glDeleteStatesNV(int[] states) Array version of: | |
| glDrawCommandsAddressNV | back to summary |
|---|---|
| public static void glDrawCommandsAddressNV(int primitiveMode, LongBuffer indirects, IntBuffer sizes) Accepts arrays of buffer addresses as an array of GPU addresses
| |
| glDrawCommandsAddressNV | back to summary |
|---|---|
| public static void glDrawCommandsAddressNV(int primitiveMode, long[] indirects, int[] sizes) Array version of: | |
| glDrawCommandsNV | back to summary |
|---|---|
| public static void glDrawCommandsNV(int primitiveMode, int buffer, PointerBuffer indirects, IntBuffer sizes) Accepts arrays of buffer addresses as an array of offsets
| |
| glDrawCommandsNV | back to summary |
|---|---|
| public static void glDrawCommandsNV(int primitiveMode, int buffer, PointerBuffer indirects, int[] sizes) Array version of: | |
| glDrawCommandsStatesAddressNV | back to summary |
|---|---|
| public static void glDrawCommandsStatesAddressNV(LongBuffer indirects, IntBuffer sizes, IntBuffer states, IntBuffer fbos) Accepts arrays of buffer addresses as an array of GPU addresses
| |
| glDrawCommandsStatesAddressNV | back to summary |
|---|---|
| public static void glDrawCommandsStatesAddressNV(long[] indirects, int[] sizes, int[] states, int[] fbos) Array version of: | |
| glDrawCommandsStatesNV | back to summary |
|---|---|
| public static void glDrawCommandsStatesNV(int buffer, PointerBuffer indirects, IntBuffer sizes, IntBuffer states, IntBuffer fbos) Accepts arrays of buffer addresses as an array of offsets
| |
| glDrawCommandsStatesNV | back to summary |
|---|---|
| public static void glDrawCommandsStatesNV(int buffer, PointerBuffer indirects, int[] sizes, int[] states, int[] fbos) Array version of: | |
| glGetCommandHeaderNV | back to summary |
|---|---|
| public static native int glGetCommandHeaderNV(int tokenID, int size) Returns the encoded 32bit header value for a given command; the returned value is implementation specific.
| |
| glGetStageIndexNV | back to summary |
|---|---|
| public static native short glGetStageIndexNV(int shadertype) Returns the 16bit value for a specific shader stage; the returned value is implementation specific. The value is to be used with the stage field within
| |
| glIsCommandListNV | back to summary |
|---|---|
| public static native boolean glIsCommandListNV(int list) Returns true if the specified name corresponds to a command list.
| |
| glIsStateNV | back to summary |
|---|---|
| public static native boolean glIsStateNV(int state) Returns true if the specified name corresponds to a state object.
| |
| glListDrawCommandsStatesClientNV | back to summary |
|---|---|
| public static void glListDrawCommandsStatesClientNV(int list, int segment, PointerBuffer indirects, IntBuffer sizes, IntBuffer states, IntBuffer fbos) A list has multiple segments and each segment enqueues an ordered list of commands. This command enqueues the equivalent of the
DrawCommandsStatesClientNV commands into the list indicated by A list has multiple segments and each segment enqueues an ordered list of command sequences. This command enqueues the equivalent of the
DrawCommandsStatesNV commands into the list indicated by The pre-validated state from ListDrawCommandsStatesClientNV performs a by-value copy of the indirect data based on the provided client-side pointers. In this case the content is fully immutable, while the buffer-based versions can change the content of the buffers at any later time.
| |
| glListDrawCommandsStatesClientNV | back to summary |
|---|---|
| public static void glListDrawCommandsStatesClientNV(int list, int segment, PointerBuffer indirects, int[] sizes, int[] states, int[] fbos) Array version of: | |
| glStateCaptureNV | back to summary | |||||||
|---|---|---|---|---|---|---|---|---|
| public static native void glStateCaptureNV(int state, int mode) Captures the current state of the rendering pipeline into the object indicated by The captured rendering state includes:
| ||||||||
| nglCreateCommandListsNV | back to summary |
|---|---|
| public static native void nglCreateCommandListsNV(int n, long lists) Unsafe version of:
| |
| nglCreateStatesNV | back to summary |
|---|---|
| public static native void nglCreateStatesNV(int n, long states) Unsafe version of:
| |
| nglDeleteCommandListsNV | back to summary |
|---|---|
| public static native void nglDeleteCommandListsNV(int n, long lists) Unsafe version of:
| |
| nglDeleteStatesNV | back to summary |
|---|---|
| public static native void nglDeleteStatesNV(int n, long states) Unsafe version of:
| |
| nglDrawCommandsAddressNV | back to summary |
|---|---|
| public static native void nglDrawCommandsAddressNV(int primitiveMode, long indirects, long sizes, int count) Unsafe version of:
| |
| nglDrawCommandsNV | back to summary |
|---|---|
| public static native void nglDrawCommandsNV(int primitiveMode, int buffer, long indirects, long sizes, int count) Unsafe version of:
| |
| nglDrawCommandsStatesAddressNV | back to summary |
|---|---|
| public static native void nglDrawCommandsStatesAddressNV(long indirects, long sizes, long states, long fbos, int count) Unsafe version of:
| |
| nglDrawCommandsStatesNV | back to summary |
|---|---|
| public static native void nglDrawCommandsStatesNV(int buffer, long indirects, long sizes, long states, long fbos, int count) Unsafe version of:
| |
| nglListDrawCommandsStatesClientNV | back to summary |
|---|---|
| public static native void nglListDrawCommandsStatesClientNV(int list, int segment, long indirects, long sizes, long states, long fbos, int count) Unsafe version of:
| |