java.lang.Object
overrungl.Pointer
overrungl.Struct
overrungl.opengl.DrawElementsIndirectCommand
- All Implemented Interfaces:
Addressable
- Direct Known Subclasses:
DrawElementsIndirectCommand.Buffer
DrawElementsIndirectCommand relies on preview features of the Java platform:
DrawElementsIndirectCommandrefers to one or more preview APIs:MemoryLayout,MemorySegment,SegmentAllocator,StructLayout.
Preview features may be removed in a future release, or upgraded to permanent features of the Java platform.
The OpenGL 4.2 draw elements indirect command.
Layout
struct DrawElementsIndirectCommand {
unsigned int count;
unsigned int primCount;
unsigned int firstIndex;
unsigned int baseVertex;
unsigned int baseInstance;
}- Since:
- 0.1.0
- Author:
- squid233
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classThe OpenGL 4.2 draw elements indirect commands. -
Field Summary
FieldsFields inherited from class overrungl.Pointer
address, allocator, managedSegment -
Constructor Summary
ConstructorsModifierConstructorDescriptionDrawElementsIndirectCommand(MemorySegmentPREVIEW address, SegmentAllocatorPREVIEW allocator) Create the pointer instance.protectedDrawElementsIndirectCommand(MemorySegmentPREVIEW address, SegmentAllocatorPREVIEW allocator, MemoryLayoutPREVIEW layout) Creates a struct instance with the given memory layout. -
Method Summary
Modifier and TypeMethodDescriptionintReturns the base instance.baseInstance(int baseInstance) Sets the base instance.intReturns the base vertex.baseVertex(int baseVertex) Sets the base vertex.intcount()Returns the count.count(int count) Sets the count.static DrawElementsIndirectCommandcreate(SegmentAllocatorPREVIEW allocator) Creates a command instance with the given allocator.create(SegmentAllocatorPREVIEW allocator, long count) Creates a command instance with the given allocator and count.intReturns the first index.firstIndex(int firstIndex) Sets the first index.intReturns the primitive count.primCount(int primCount) Sets the primitive count.
-
Field Details
-
LAYOUT
The struct layout.
-
-
Constructor Details
-
DrawElementsIndirectCommand
Create the pointer instance.- Parameters:
address- the address.allocator- the allocator of this address.
-
DrawElementsIndirectCommand
protected DrawElementsIndirectCommand(MemorySegmentPREVIEW address, SegmentAllocatorPREVIEW allocator, MemoryLayoutPREVIEW layout) Creates a struct instance with the given memory layout.- Parameters:
address- the address.allocator- the allocator of this address.layout- the memory layout of this struct.
-
-
Method Details
-
create
Creates a command instance with the given allocator.- Parameters:
allocator- the allocator- Returns:
- the instance
-
create
public static DrawElementsIndirectCommand.Buffer create(SegmentAllocatorPREVIEW allocator, long count) Creates a command instance with the given allocator and count.- Parameters:
allocator- the allocatorcount- the count- Returns:
- the instance
-
count
Sets the count.- Parameters:
count- the count- Returns:
- this
-
primCount
Sets the primitive count.- Parameters:
primCount- the primitive count- Returns:
- this
-
firstIndex
Sets the first index.- Parameters:
firstIndex- the first index- Returns:
- this
-
baseVertex
Sets the base vertex.- Parameters:
baseVertex- the base vertex- Returns:
- this
-
baseInstance
Sets the base instance.- Parameters:
baseInstance- the base instance- Returns:
- this
-
count
public int count()Returns the count.- Returns:
- the count
-
primCount
public int primCount()Returns the primitive count.- Returns:
- the primitive count
-
firstIndex
public int firstIndex()Returns the first index.- Returns:
- the first index
-
baseVertex
public int baseVertex()Returns the base vertex.- Returns:
- the base vertex
-
baseInstance
public int baseInstance()Returns the base instance.- Returns:
- the base instance
-
DrawElementsIndirectCommandwhen preview features are enabled.