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:
DrawElementsIndirectCommand
refers 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
Modifier and TypeClassDescriptionstatic class
The OpenGL 4.2 draw elements indirect commands. -
Field Summary
Fields inherited from class overrungl.Pointer
address, allocator, managedSegment
-
Constructor Summary
ModifierConstructorDescriptionDrawElementsIndirectCommand
(MemorySegmentPREVIEW address, SegmentAllocatorPREVIEW allocator) Create the pointer instance.protected
DrawElementsIndirectCommand
(MemorySegmentPREVIEW address, SegmentAllocatorPREVIEW allocator, MemoryLayoutPREVIEW layout) Creates a struct instance with the given memory layout. -
Method Summary
Modifier and TypeMethodDescriptionint
Returns the base instance.baseInstance
(int baseInstance) Sets the base instance.int
Returns the base vertex.baseVertex
(int baseVertex) Sets the base vertex.int
count()
Returns the count.count
(int count) Sets the count.static DrawElementsIndirectCommand
create
(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.int
Returns the first index.firstIndex
(int firstIndex) Sets the first index.int
Returns 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
-
DrawElementsIndirectCommand
when preview features are enabled.