Top Description Constructors Methods
org.lwjgl.opengl

public Class NVBindlessMultiDrawIndirect

extends Object
Class Inheritance
Imports
java.nio.*, org.lwjgl.system.*

Native bindings to the NV_bindless_multi_draw_indirect extension.

This extension combines NV_vertex_buffer_unified_memory and ARB_multi_draw_indirect to allow the processing of multiple drawing commands, whose vertex and index data can be sourced from arbitrary buffer locations, by a single function call.

The NV_vertex_buffer_unified_memory extension provided a mechanism to specify vertex attrib and element array locations using GPU addresses. Prior to this extension, these addresses had to be set through explicit function calls. Now the ability to set the pointer addresses indirectly by extending the ARB_draw_indirect mechanism has been added.

Combined with other "bindless" extensions, such as NV_bindless_texture and NV_shader_buffer_load, it is now possible for the GPU to create draw commands that source all resource inputs, which are common to change frequently between draw calls from the GPU: vertex and index buffers, samplers, images and other shader input data stored in buffers.

Requires OpenGL 4.3 or ARB_multi_draw_indirect, and NV_vertex_buffer_unified_memory.

Constructor Summary

AccessConstructor and Description
protected

Method Summary

Modifier and TypeMethod and Description
public static void
glMultiDrawArraysIndirectBindlessNV(int mode, ByteBuffer
an array of DrawArraysIndirectBindlessCommandNV structures (see the extension spec for more information)
indirect
,
int
the number of structures in the indirect array
drawCount
,
int
the size of one DrawArraysIndirectBindlessCommandNV structure
stride
,
int
the number of vertex buffers in the DrawArraysIndirectBindlessCommandNV structure
vertexBufferCount
)

Behaves similar to MultiDrawArraysIndirect, except that indirect is treated as an array of drawCount DrawArraysIndirectBindlessCommandNV structures:


typedef struct {
  GLuint   index;
  GLuint   reserved;
  GLuint64 address;
  GLuint64 length;
} BindlessPtrNV;

typedef struct {
  DrawArraysIndirectCommand   cmd;
  BindlessPtrNV               vertexBuffers[];
} DrawArraysIndirectBindlessCommandNV;
public static void
glMultiDrawArraysIndirectBindlessNV(int mode, long
an array of DrawArraysIndirectBindlessCommandNV structures (see the extension spec for more information)
indirect
,
int
the number of structures in the indirect array
drawCount
,
int
the size of one DrawArraysIndirectBindlessCommandNV structure
stride
,
int
the number of vertex buffers in the DrawArraysIndirectBindlessCommandNV structure
vertexBufferCount
)

Behaves similar to MultiDrawArraysIndirect, except that indirect is treated as an array of drawCount DrawArraysIndirectBindlessCommandNV structures:


typedef struct {
  GLuint   index;
  GLuint   reserved;
  GLuint64 address;
  GLuint64 length;
} BindlessPtrNV;

typedef struct {
  DrawArraysIndirectCommand   cmd;
  BindlessPtrNV               vertexBuffers[];
} DrawArraysIndirectBindlessCommandNV;
public static void
glMultiDrawElementsIndirectBindlessNV(int mode, int
the data type of the element indices. One of:
UNSIGNED_BYTEUNSIGNED_SHORTUNSIGNED_INT
type
,
ByteBuffer
an array of DrawElementsIndirectBindlessCommandNV structures (see the extension spec for more information)
indirect
,
int
the number of structures in the indirect array
drawCount
,
int
the size of one DrawElementsIndirectBindlessCommandNV structure
stride
,
int
the number of vertex buffers in the DrawElementsIndirectBindlessCommandNV structure
vertexBufferCount
)

Behaves similar to MultiDrawElementsIndirect, except that indirect is treated as an array of drawCount DrawElementsIndirectBindlessCommandNV structures:


 typedef struct {
  GLuint   index;
  GLuint   reserved;
  GLuint64 address;
  GLuint64 length;
} BindlessPtrNV;

typedef struct {
  DrawElementsIndirectCommand cmd;
  GLuint                      reserved;
  BindlessPtrNV               indexBuffer;
  BindlessPtrNV               vertexBuffers[];
} DrawElementsIndirectBindlessCommandNV;
public static void
glMultiDrawElementsIndirectBindlessNV(int mode, int
the data type of the element indices. One of:
UNSIGNED_BYTEUNSIGNED_SHORTUNSIGNED_INT
type
,
long
an array of DrawElementsIndirectBindlessCommandNV structures (see the extension spec for more information)
indirect
,
int
the number of structures in the indirect array
drawCount
,
int
the size of one DrawElementsIndirectBindlessCommandNV structure
stride
,
int
the number of vertex buffers in the DrawElementsIndirectBindlessCommandNV structure
vertexBufferCount
)

Behaves similar to MultiDrawElementsIndirect, except that indirect is treated as an array of drawCount DrawElementsIndirectBindlessCommandNV structures:


 typedef struct {
  GLuint   index;
  GLuint   reserved;
  GLuint64 address;
  GLuint64 length;
} BindlessPtrNV;

typedef struct {
  DrawElementsIndirectCommand cmd;
  GLuint                      reserved;
  BindlessPtrNV               indexBuffer;
  BindlessPtrNV               vertexBuffers[];
} DrawElementsIndirectBindlessCommandNV;
public static native void
nglMultiDrawArraysIndirectBindlessNV(int mode, long indirect, int drawCount, int stride, int vertexBufferCount)

Unsafe version of: MultiDrawArraysIndirectBindlessNV

public static native void
nglMultiDrawElementsIndirectBindlessNV(int mode, int type, long indirect, int drawCount, int stride, int vertexBufferCount)

Unsafe version of: MultiDrawElementsIndirectBindlessNV

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Constructor Detail

NVBindlessMultiDrawIndirectback to summary
protected NVBindlessMultiDrawIndirect()

Method Detail

glMultiDrawArraysIndirectBindlessNVback to summary
public static void glMultiDrawArraysIndirectBindlessNV(int mode, ByteBuffer indirect, int drawCount, int stride, int vertexBufferCount)

Behaves similar to MultiDrawArraysIndirect, except that indirect is treated as an array of drawCount DrawArraysIndirectBindlessCommandNV structures:


typedef struct {
  GLuint   index;
  GLuint   reserved;
  GLuint64 address;
  GLuint64 length;
} BindlessPtrNV;

typedef struct {
  DrawArraysIndirectCommand   cmd;
  BindlessPtrNV               vertexBuffers[];
} DrawArraysIndirectBindlessCommandNV;
Parameters
mode:int

the primitive mode. One of:

POINTSLINE_STRIPLINE_LOOPLINESTRIANGLE_STRIPTRIANGLE_FANTRIANGLES
LINES_ADJACENCYLINE_STRIP_ADJACENCYTRIANGLES_ADJACENCYTRIANGLE_STRIP_ADJACENCYPATCHESPOLYGONQUADS
QUAD_STRIP
indirect:ByteBuffer

an array of DrawArraysIndirectBindlessCommandNV structures (see the extension spec for more information)

drawCount:int

the number of structures in the indirect array

stride:int

the size of one DrawArraysIndirectBindlessCommandNV structure

vertexBufferCount:int

the number of vertex buffers in the DrawArraysIndirectBindlessCommandNV structure

glMultiDrawArraysIndirectBindlessNVback to summary
public static void glMultiDrawArraysIndirectBindlessNV(int mode, long indirect, int drawCount, int stride, int vertexBufferCount)

Behaves similar to MultiDrawArraysIndirect, except that indirect is treated as an array of drawCount DrawArraysIndirectBindlessCommandNV structures:


typedef struct {
  GLuint   index;
  GLuint   reserved;
  GLuint64 address;
  GLuint64 length;
} BindlessPtrNV;

typedef struct {
  DrawArraysIndirectCommand   cmd;
  BindlessPtrNV               vertexBuffers[];
} DrawArraysIndirectBindlessCommandNV;
Parameters
mode:int

the primitive mode. One of:

POINTSLINE_STRIPLINE_LOOPLINESTRIANGLE_STRIPTRIANGLE_FANTRIANGLES
LINES_ADJACENCYLINE_STRIP_ADJACENCYTRIANGLES_ADJACENCYTRIANGLE_STRIP_ADJACENCYPATCHESPOLYGONQUADS
QUAD_STRIP
indirect:long

an array of DrawArraysIndirectBindlessCommandNV structures (see the extension spec for more information)

drawCount:int

the number of structures in the indirect array

stride:int

the size of one DrawArraysIndirectBindlessCommandNV structure

vertexBufferCount:int

the number of vertex buffers in the DrawArraysIndirectBindlessCommandNV structure

glMultiDrawElementsIndirectBindlessNVback to summary
public static void glMultiDrawElementsIndirectBindlessNV(int mode, int type, ByteBuffer indirect, int drawCount, int stride, int vertexBufferCount)

Behaves similar to MultiDrawElementsIndirect, except that indirect is treated as an array of drawCount DrawElementsIndirectBindlessCommandNV structures:


 typedef struct {
  GLuint   index;
  GLuint   reserved;
  GLuint64 address;
  GLuint64 length;
} BindlessPtrNV;

typedef struct {
  DrawElementsIndirectCommand cmd;
  GLuint                      reserved;
  BindlessPtrNV               indexBuffer;
  BindlessPtrNV               vertexBuffers[];
} DrawElementsIndirectBindlessCommandNV;
Parameters
mode:int

the primitive mode. One of:

POINTSLINE_STRIPLINE_LOOPLINESTRIANGLE_STRIPTRIANGLE_FANTRIANGLES
LINES_ADJACENCYLINE_STRIP_ADJACENCYTRIANGLES_ADJACENCYTRIANGLE_STRIP_ADJACENCYPATCHESPOLYGONQUADS
QUAD_STRIP
type:int

the data type of the element indices. One of:

UNSIGNED_BYTEUNSIGNED_SHORTUNSIGNED_INT
indirect:ByteBuffer

an array of DrawElementsIndirectBindlessCommandNV structures (see the extension spec for more information)

drawCount:int

the number of structures in the indirect array

stride:int

the size of one DrawElementsIndirectBindlessCommandNV structure

vertexBufferCount:int

the number of vertex buffers in the DrawElementsIndirectBindlessCommandNV structure

glMultiDrawElementsIndirectBindlessNVback to summary
public static void glMultiDrawElementsIndirectBindlessNV(int mode, int type, long indirect, int drawCount, int stride, int vertexBufferCount)

Behaves similar to MultiDrawElementsIndirect, except that indirect is treated as an array of drawCount DrawElementsIndirectBindlessCommandNV structures:


 typedef struct {
  GLuint   index;
  GLuint   reserved;
  GLuint64 address;
  GLuint64 length;
} BindlessPtrNV;

typedef struct {
  DrawElementsIndirectCommand cmd;
  GLuint                      reserved;
  BindlessPtrNV               indexBuffer;
  BindlessPtrNV               vertexBuffers[];
} DrawElementsIndirectBindlessCommandNV;
Parameters
mode:int

the primitive mode. One of:

POINTSLINE_STRIPLINE_LOOPLINESTRIANGLE_STRIPTRIANGLE_FANTRIANGLES
LINES_ADJACENCYLINE_STRIP_ADJACENCYTRIANGLES_ADJACENCYTRIANGLE_STRIP_ADJACENCYPATCHESPOLYGONQUADS
QUAD_STRIP
type:int

the data type of the element indices. One of:

UNSIGNED_BYTEUNSIGNED_SHORTUNSIGNED_INT
indirect:long

an array of DrawElementsIndirectBindlessCommandNV structures (see the extension spec for more information)

drawCount:int

the number of structures in the indirect array

stride:int

the size of one DrawElementsIndirectBindlessCommandNV structure

vertexBufferCount:int

the number of vertex buffers in the DrawElementsIndirectBindlessCommandNV structure

nglMultiDrawArraysIndirectBindlessNVback to summary
public static native void nglMultiDrawArraysIndirectBindlessNV(int mode, long indirect, int drawCount, int stride, int vertexBufferCount)

Unsafe version of: MultiDrawArraysIndirectBindlessNV

nglMultiDrawElementsIndirectBindlessNVback to summary
public static native void nglMultiDrawElementsIndirectBindlessNV(int mode, int type, long indirect, int drawCount, int stride, int vertexBufferCount)

Unsafe version of: MultiDrawElementsIndirectBindlessNV