Package org.lwjgl.nuklear
Class NkDrawVertexLayoutElement
- java.lang.Object
-
- org.lwjgl.system.Pointer.Default
-
- org.lwjgl.system.Struct
-
- org.lwjgl.nuklear.NkDrawVertexLayoutElement
-
- All Implemented Interfaces:
java.lang.AutoCloseable
,org.lwjgl.system.NativeResource
,org.lwjgl.system.Pointer
public class NkDrawVertexLayoutElement extends org.lwjgl.system.Struct implements org.lwjgl.system.NativeResource
Member documentation
attribute
– the vertex attribute. One of:VERTEX_POSITION
VERTEX_COLOR
VERTEX_TEXCOORD
VERTEX_ATTRIBUTE_COUNT
format
– the vertex attribute format. One of:offset
– the vertex attribute offset
Layout
struct nk_draw_vertex_layout_element { enum nk_draw_vertex_layout_attribute attribute; enum nk_draw_vertex_layout_format format; nk_size offset; }
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
NkDrawVertexLayoutElement.Buffer
An array ofNkDrawVertexLayoutElement
structs.
-
Constructor Summary
Constructors Constructor Description NkDrawVertexLayoutElement(java.nio.ByteBuffer container)
Creates aNkDrawVertexLayoutElement
instance at the current position of the specifiedByteBuffer
container.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description int
attribute()
Returns the value of theattribute
field.NkDrawVertexLayoutElement
attribute(int value)
Sets the specified value to theattribute
field.static NkDrawVertexLayoutElement
calloc()
Returns a newNkDrawVertexLayoutElement
instance allocated withmemCalloc
.static NkDrawVertexLayoutElement.Buffer
calloc(int capacity)
Returns a newNkDrawVertexLayoutElement.Buffer
instance allocated withmemCalloc
.static NkDrawVertexLayoutElement
callocStack()
Returns a newNkDrawVertexLayoutElement
instance allocated on the thread-localMemoryStack
and initializes all its bits to zero.static NkDrawVertexLayoutElement.Buffer
callocStack(int capacity)
Returns a newNkDrawVertexLayoutElement.Buffer
instance allocated on the thread-localMemoryStack
and initializes all its bits to zero.static NkDrawVertexLayoutElement.Buffer
callocStack(int capacity, org.lwjgl.system.MemoryStack stack)
Returns a newNkDrawVertexLayoutElement.Buffer
instance allocated on the specifiedMemoryStack
and initializes all its bits to zero.static NkDrawVertexLayoutElement
callocStack(org.lwjgl.system.MemoryStack stack)
Returns a newNkDrawVertexLayoutElement
instance allocated on the specifiedMemoryStack
and initializes all its bits to zero.static NkDrawVertexLayoutElement
create()
Returns a newNkDrawVertexLayoutElement
instance allocated withBufferUtils
.static NkDrawVertexLayoutElement.Buffer
create(int capacity)
Returns a newNkDrawVertexLayoutElement.Buffer
instance allocated withBufferUtils
.static NkDrawVertexLayoutElement
create(long address)
Returns a newNkDrawVertexLayoutElement
instance for the specified memory address.static NkDrawVertexLayoutElement.Buffer
create(long address, int capacity)
Create aNkDrawVertexLayoutElement.Buffer
instance at the specified memory.static NkDrawVertexLayoutElement
createSafe(long address)
static NkDrawVertexLayoutElement.Buffer
createSafe(long address, int capacity)
int
format()
Returns the value of theformat
field.NkDrawVertexLayoutElement
format(int value)
Sets the specified value to theformat
field.static NkDrawVertexLayoutElement
malloc()
Returns a newNkDrawVertexLayoutElement
instance allocated withmemAlloc
.static NkDrawVertexLayoutElement.Buffer
malloc(int capacity)
Returns a newNkDrawVertexLayoutElement.Buffer
instance allocated withmemAlloc
.static NkDrawVertexLayoutElement
mallocStack()
Returns a newNkDrawVertexLayoutElement
instance allocated on the thread-localMemoryStack
.static NkDrawVertexLayoutElement.Buffer
mallocStack(int capacity)
Returns a newNkDrawVertexLayoutElement.Buffer
instance allocated on the thread-localMemoryStack
.static NkDrawVertexLayoutElement.Buffer
mallocStack(int capacity, org.lwjgl.system.MemoryStack stack)
Returns a newNkDrawVertexLayoutElement.Buffer
instance allocated on the specifiedMemoryStack
.static NkDrawVertexLayoutElement
mallocStack(org.lwjgl.system.MemoryStack stack)
Returns a newNkDrawVertexLayoutElement
instance allocated on the specifiedMemoryStack
.static int
nattribute(long struct)
Unsafe version ofattribute()
.static void
nattribute(long struct, int value)
Unsafe version ofattribute
.static int
nformat(long struct)
Unsafe version offormat()
.static void
nformat(long struct, int value)
Unsafe version offormat
.static long
noffset(long struct)
Unsafe version ofoffset()
.static void
noffset(long struct, long value)
Unsafe version ofoffset
.long
offset()
Returns the value of theoffset
field.NkDrawVertexLayoutElement
offset(long value)
Sets the specified value to theoffset
field.NkDrawVertexLayoutElement
set(int attribute, int format, long offset)
Initializes this struct with the specified values.NkDrawVertexLayoutElement
set(NkDrawVertexLayoutElement src)
Copies the specified struct data to this struct.int
sizeof()
-
-
-
Constructor Detail
-
NkDrawVertexLayoutElement
public NkDrawVertexLayoutElement(java.nio.ByteBuffer container)
Creates aNkDrawVertexLayoutElement
instance at the current position of the specifiedByteBuffer
container. Changes to the buffer's content will be visible to the struct instance and vice versa.The created instance holds a strong reference to the container object.
-
-
Method Detail
-
sizeof
public int sizeof()
- Specified by:
sizeof
in classorg.lwjgl.system.Struct
-
attribute
public int attribute()
Returns the value of theattribute
field.
-
format
public int format()
Returns the value of theformat
field.
-
offset
public long offset()
Returns the value of theoffset
field.
-
attribute
public NkDrawVertexLayoutElement attribute(int value)
Sets the specified value to theattribute
field.
-
format
public NkDrawVertexLayoutElement format(int value)
Sets the specified value to theformat
field.
-
offset
public NkDrawVertexLayoutElement offset(long value)
Sets the specified value to theoffset
field.
-
set
public NkDrawVertexLayoutElement set(int attribute, int format, long offset)
Initializes this struct with the specified values.
-
set
public NkDrawVertexLayoutElement set(NkDrawVertexLayoutElement src)
Copies the specified struct data to this struct.- Parameters:
src
- the source struct- Returns:
- this struct
-
malloc
public static NkDrawVertexLayoutElement malloc()
Returns a newNkDrawVertexLayoutElement
instance allocated withmemAlloc
. The instance must be explicitly freed.
-
calloc
public static NkDrawVertexLayoutElement calloc()
Returns a newNkDrawVertexLayoutElement
instance allocated withmemCalloc
. The instance must be explicitly freed.
-
create
public static NkDrawVertexLayoutElement create()
Returns a newNkDrawVertexLayoutElement
instance allocated withBufferUtils
.
-
create
public static NkDrawVertexLayoutElement create(long address)
Returns a newNkDrawVertexLayoutElement
instance for the specified memory address.
-
createSafe
@Nullable public static NkDrawVertexLayoutElement createSafe(long address)
-
malloc
public static NkDrawVertexLayoutElement.Buffer malloc(int capacity)
Returns a newNkDrawVertexLayoutElement.Buffer
instance allocated withmemAlloc
. The instance must be explicitly freed.- Parameters:
capacity
- the buffer capacity
-
calloc
public static NkDrawVertexLayoutElement.Buffer calloc(int capacity)
Returns a newNkDrawVertexLayoutElement.Buffer
instance allocated withmemCalloc
. The instance must be explicitly freed.- Parameters:
capacity
- the buffer capacity
-
create
public static NkDrawVertexLayoutElement.Buffer create(int capacity)
Returns a newNkDrawVertexLayoutElement.Buffer
instance allocated withBufferUtils
.- Parameters:
capacity
- the buffer capacity
-
create
public static NkDrawVertexLayoutElement.Buffer create(long address, int capacity)
Create aNkDrawVertexLayoutElement.Buffer
instance at the specified memory.- Parameters:
address
- the memory addresscapacity
- the buffer capacity
-
createSafe
@Nullable public static NkDrawVertexLayoutElement.Buffer createSafe(long address, int capacity)
-
mallocStack
public static NkDrawVertexLayoutElement mallocStack()
Returns a newNkDrawVertexLayoutElement
instance allocated on the thread-localMemoryStack
.
-
callocStack
public static NkDrawVertexLayoutElement callocStack()
Returns a newNkDrawVertexLayoutElement
instance allocated on the thread-localMemoryStack
and initializes all its bits to zero.
-
mallocStack
public static NkDrawVertexLayoutElement mallocStack(org.lwjgl.system.MemoryStack stack)
Returns a newNkDrawVertexLayoutElement
instance allocated on the specifiedMemoryStack
.- Parameters:
stack
- the stack from which to allocate
-
callocStack
public static NkDrawVertexLayoutElement callocStack(org.lwjgl.system.MemoryStack stack)
Returns a newNkDrawVertexLayoutElement
instance allocated on the specifiedMemoryStack
and initializes all its bits to zero.- Parameters:
stack
- the stack from which to allocate
-
mallocStack
public static NkDrawVertexLayoutElement.Buffer mallocStack(int capacity)
Returns a newNkDrawVertexLayoutElement.Buffer
instance allocated on the thread-localMemoryStack
.- Parameters:
capacity
- the buffer capacity
-
callocStack
public static NkDrawVertexLayoutElement.Buffer callocStack(int capacity)
Returns a newNkDrawVertexLayoutElement.Buffer
instance allocated on the thread-localMemoryStack
and initializes all its bits to zero.- Parameters:
capacity
- the buffer capacity
-
mallocStack
public static NkDrawVertexLayoutElement.Buffer mallocStack(int capacity, org.lwjgl.system.MemoryStack stack)
Returns a newNkDrawVertexLayoutElement.Buffer
instance allocated on the specifiedMemoryStack
.- Parameters:
stack
- the stack from which to allocatecapacity
- the buffer capacity
-
callocStack
public static NkDrawVertexLayoutElement.Buffer callocStack(int capacity, org.lwjgl.system.MemoryStack stack)
Returns a newNkDrawVertexLayoutElement.Buffer
instance allocated on the specifiedMemoryStack
and initializes all its bits to zero.- Parameters:
stack
- the stack from which to allocatecapacity
- the buffer capacity
-
nattribute
public static int nattribute(long struct)
Unsafe version ofattribute()
.
-
nformat
public static int nformat(long struct)
Unsafe version offormat()
.
-
noffset
public static long noffset(long struct)
Unsafe version ofoffset()
.
-
nattribute
public static void nattribute(long struct, int value)
Unsafe version ofattribute
.
-
nformat
public static void nformat(long struct, int value)
Unsafe version offormat
.
-
noffset
public static void noffset(long struct, long value)
Unsafe version ofoffset
.
-
-