Package org.lwjgl.nuklear
Class NkConvertConfig
- java.lang.Object
-
- org.lwjgl.system.Pointer.Default
-
- org.lwjgl.system.Struct
-
- org.lwjgl.nuklear.NkConvertConfig
-
- All Implemented Interfaces:
java.lang.AutoCloseable,org.lwjgl.system.NativeResource,org.lwjgl.system.Pointer
public class NkConvertConfig extends org.lwjgl.system.Struct implements org.lwjgl.system.NativeResourceMember documentation
global_alpha– global alpha valueline_AA– line anti-aliasing flag can be turned off if you are tight on memory. One of:ANTI_ALIASING_OFFANTI_ALIASING_ONshape_AA– shape anti-aliasing flag can be turned off if you are tight on memory. One of:ANTI_ALIASING_OFFANTI_ALIASING_ONcircle_segment_count– number of segments used for circles: default to 22arc_segment_count– number of segments used for arcs: default to 22curve_segment_count– number of segments used for curves: default to 22null_texture– handle to texture with a white pixel for shape drawingvertex_layout– describes the vertex output format and packingvertex_size– sizeof one vertex for vertex packingvertex_alignment– vertex alignment: Can be optained by NK_ALIGNOF
Layout
struct nk_convert_config { float global_alpha; enum nk_anti_aliasing line_AA; enum nk_anti_aliasing shape_AA; unsigned int circle_segment_count; unsigned int arc_segment_count; unsigned int curve_segment_count;struct nk_draw_null_texturenull_texture;struct nk_draw_vertex_layout_element* vertex_layout; nk_size vertex_size; nk_size vertex_alignment; }
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classNkConvertConfig.BufferAn array ofNkConvertConfigstructs.
-
Field Summary
Fields Modifier and Type Field Description static intALIGNOFThe struct alignment in bytes.static intARC_SEGMENT_COUNT
CIRCLE_SEGMENT_COUNT
CURVE_SEGMENT_COUNT
GLOBAL_ALPHA
LINE_AA
NULL_TEXTURE
SHAPE_AAThe struct member offsets.static intSIZEOFThe struct size in bytes.static intVERTEX_ALIGNMENT
VERTEX_LAYOUT
VERTEX_SIZEThe struct member offsets.
-
Constructor Summary
Constructors Constructor Description NkConvertConfig(java.nio.ByteBuffer container)Creates aNkConvertConfiginstance at the current position of the specifiedByteBuffercontainer.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description intarc_segment_count()Returns the value of thearc_segment_countfield.NkConvertConfigarc_segment_count(int value)Sets the specified value to thearc_segment_countfield.static NkConvertConfigcalloc()Returns a newNkConvertConfiginstance allocated withmemCalloc.static NkConvertConfig.Buffercalloc(int capacity)Returns a newNkConvertConfig.Bufferinstance allocated withmemCalloc.static NkConvertConfigcallocStack()Returns a newNkConvertConfiginstance allocated on the thread-localMemoryStackand initializes all its bits to zero.static NkConvertConfig.BuffercallocStack(int capacity)Returns a newNkConvertConfig.Bufferinstance allocated on the thread-localMemoryStackand initializes all its bits to zero.static NkConvertConfig.BuffercallocStack(int capacity, org.lwjgl.system.MemoryStack stack)Returns a newNkConvertConfig.Bufferinstance allocated on the specifiedMemoryStackand initializes all its bits to zero.static NkConvertConfigcallocStack(org.lwjgl.system.MemoryStack stack)Returns a newNkConvertConfiginstance allocated on the specifiedMemoryStackand initializes all its bits to zero.intcircle_segment_count()Returns the value of thecircle_segment_countfield.NkConvertConfigcircle_segment_count(int value)Sets the specified value to thecircle_segment_countfield.static NkConvertConfigcreate()Returns a newNkConvertConfiginstance allocated withBufferUtils.static NkConvertConfig.Buffercreate(int capacity)Returns a newNkConvertConfig.Bufferinstance allocated withBufferUtils.static NkConvertConfigcreate(long address)Returns a newNkConvertConfiginstance for the specified memory address.static NkConvertConfig.Buffercreate(long address, int capacity)Create aNkConvertConfig.Bufferinstance at the specified memory.static NkConvertConfigcreateSafe(long address)static NkConvertConfig.BuffercreateSafe(long address, int capacity)intcurve_segment_count()Returns the value of thecurve_segment_countfield.NkConvertConfigcurve_segment_count(int value)Sets the specified value to thecurve_segment_countfield.floatglobal_alpha()Returns the value of theglobal_alphafield.NkConvertConfigglobal_alpha(float value)Sets the specified value to theglobal_alphafield.intline_AA()Returns the value of theline_AAfield.NkConvertConfigline_AA(int value)Sets the specified value to theline_AAfield.static NkConvertConfigmalloc()Returns a newNkConvertConfiginstance allocated withmemAlloc.static NkConvertConfig.Buffermalloc(int capacity)Returns a newNkConvertConfig.Bufferinstance allocated withmemAlloc.static NkConvertConfigmallocStack()Returns a newNkConvertConfiginstance allocated on the thread-localMemoryStack.static NkConvertConfig.BuffermallocStack(int capacity)Returns a newNkConvertConfig.Bufferinstance allocated on the thread-localMemoryStack.static NkConvertConfig.BuffermallocStack(int capacity, org.lwjgl.system.MemoryStack stack)Returns a newNkConvertConfig.Bufferinstance allocated on the specifiedMemoryStack.static NkConvertConfigmallocStack(org.lwjgl.system.MemoryStack stack)Returns a newNkConvertConfiginstance allocated on the specifiedMemoryStack.static intnarc_segment_count(long struct)Unsafe version ofarc_segment_count().static voidnarc_segment_count(long struct, int value)Unsafe version ofarc_segment_count.static intncircle_segment_count(long struct)Unsafe version ofcircle_segment_count().static voidncircle_segment_count(long struct, int value)Unsafe version ofcircle_segment_count.static intncurve_segment_count(long struct)Unsafe version ofcurve_segment_count().static voidncurve_segment_count(long struct, int value)Unsafe version ofcurve_segment_count.static floatnglobal_alpha(long struct)Unsafe version ofglobal_alpha().static voidnglobal_alpha(long struct, float value)Unsafe version ofglobal_alpha.static intnline_AA(long struct)Unsafe version ofline_AA().static voidnline_AA(long struct, int value)Unsafe version ofline_AA.static NkDrawNullTexturennull_texture(long struct)Unsafe version ofnull_texture().static voidnnull_texture(long struct, NkDrawNullTexture value)Unsafe version ofnull_texture.static intnshape_AA(long struct)Unsafe version ofshape_AA().static voidnshape_AA(long struct, int value)Unsafe version ofshape_AA.NkDrawNullTexturenull_texture()Returns aNkDrawNullTextureview of thenull_texturefield.NkConvertConfignull_texture(java.util.function.Consumer<NkDrawNullTexture> consumer)Passes thenull_texturefield to the specifiedConsumer.NkConvertConfignull_texture(NkDrawNullTexture value)Copies the specifiedNkDrawNullTextureto thenull_texturefield.static longnvertex_alignment(long struct)Unsafe version ofvertex_alignment().static voidnvertex_alignment(long struct, long value)Unsafe version ofvertex_alignment.static NkDrawVertexLayoutElement.Buffernvertex_layout(long struct, int capacity)Unsafe version ofvertex_layout(int).static voidnvertex_layout(long struct, NkDrawVertexLayoutElement.Buffer value)Unsafe version ofvertex_layout.static longnvertex_size(long struct)Unsafe version ofvertex_size().static voidnvertex_size(long struct, long value)Unsafe version ofvertex_size.NkConvertConfigset(float global_alpha, int line_AA, int shape_AA, int circle_segment_count, int arc_segment_count, int curve_segment_count, NkDrawNullTexture null_texture, NkDrawVertexLayoutElement.Buffer vertex_layout, long vertex_size, long vertex_alignment)Initializes this struct with the specified values.NkConvertConfigset(NkConvertConfig src)Copies the specified struct data to this struct.intshape_AA()Returns the value of theshape_AAfield.NkConvertConfigshape_AA(int value)Sets the specified value to theshape_AAfield.intsizeof()static voidvalidate(long struct)Validates pointer members that should not beNULL.static voidvalidate(long array, int count)Callsvalidate(long)for each struct contained in the specified struct array.longvertex_alignment()Returns the value of thevertex_alignmentfield.NkConvertConfigvertex_alignment(long value)Sets the specified value to thevertex_alignmentfield.NkDrawVertexLayoutElement.Buffervertex_layout(int capacity)Returns aNkDrawVertexLayoutElement.Bufferview of the struct array pointed to by thevertex_layoutfield.NkConvertConfigvertex_layout(NkDrawVertexLayoutElement.Buffer value)Sets the address of the specifiedNkDrawVertexLayoutElement.Bufferto thevertex_layoutfield.longvertex_size()Returns the value of thevertex_sizefield.NkConvertConfigvertex_size(long value)Sets the specified value to thevertex_sizefield.
-
-
-
Constructor Detail
-
NkConvertConfig
public NkConvertConfig(java.nio.ByteBuffer container)
Creates aNkConvertConfiginstance at the current position of the specifiedByteBuffercontainer. 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:
sizeofin classorg.lwjgl.system.Struct
-
global_alpha
public float global_alpha()
Returns the value of theglobal_alphafield.
-
line_AA
public int line_AA()
Returns the value of theline_AAfield.
-
shape_AA
public int shape_AA()
Returns the value of theshape_AAfield.
-
circle_segment_count
public int circle_segment_count()
Returns the value of thecircle_segment_countfield.
-
arc_segment_count
public int arc_segment_count()
Returns the value of thearc_segment_countfield.
-
curve_segment_count
public int curve_segment_count()
Returns the value of thecurve_segment_countfield.
-
null_texture
public NkDrawNullTexture null_texture()
Returns aNkDrawNullTextureview of thenull_texturefield.
-
null_texture
public NkConvertConfig null_texture(java.util.function.Consumer<NkDrawNullTexture> consumer)
Passes thenull_texturefield to the specifiedConsumer.
-
vertex_layout
public NkDrawVertexLayoutElement.Buffer vertex_layout(int capacity)
Returns aNkDrawVertexLayoutElement.Bufferview of the struct array pointed to by thevertex_layoutfield.- Parameters:
capacity- the number of elements in the returned buffer
-
vertex_size
public long vertex_size()
Returns the value of thevertex_sizefield.
-
vertex_alignment
public long vertex_alignment()
Returns the value of thevertex_alignmentfield.
-
global_alpha
public NkConvertConfig global_alpha(float value)
Sets the specified value to theglobal_alphafield.
-
line_AA
public NkConvertConfig line_AA(int value)
Sets the specified value to theline_AAfield.
-
shape_AA
public NkConvertConfig shape_AA(int value)
Sets the specified value to theshape_AAfield.
-
circle_segment_count
public NkConvertConfig circle_segment_count(int value)
Sets the specified value to thecircle_segment_countfield.
-
arc_segment_count
public NkConvertConfig arc_segment_count(int value)
Sets the specified value to thearc_segment_countfield.
-
curve_segment_count
public NkConvertConfig curve_segment_count(int value)
Sets the specified value to thecurve_segment_countfield.
-
null_texture
public NkConvertConfig null_texture(NkDrawNullTexture value)
Copies the specifiedNkDrawNullTextureto thenull_texturefield.
-
vertex_layout
public NkConvertConfig vertex_layout(NkDrawVertexLayoutElement.Buffer value)
Sets the address of the specifiedNkDrawVertexLayoutElement.Bufferto thevertex_layoutfield.
-
vertex_size
public NkConvertConfig vertex_size(long value)
Sets the specified value to thevertex_sizefield.
-
vertex_alignment
public NkConvertConfig vertex_alignment(long value)
Sets the specified value to thevertex_alignmentfield.
-
set
public NkConvertConfig set(float global_alpha, int line_AA, int shape_AA, int circle_segment_count, int arc_segment_count, int curve_segment_count, NkDrawNullTexture null_texture, NkDrawVertexLayoutElement.Buffer vertex_layout, long vertex_size, long vertex_alignment)
Initializes this struct with the specified values.
-
set
public NkConvertConfig set(NkConvertConfig src)
Copies the specified struct data to this struct.- Parameters:
src- the source struct- Returns:
- this struct
-
malloc
public static NkConvertConfig malloc()
Returns a newNkConvertConfiginstance allocated withmemAlloc. The instance must be explicitly freed.
-
calloc
public static NkConvertConfig calloc()
Returns a newNkConvertConfiginstance allocated withmemCalloc. The instance must be explicitly freed.
-
create
public static NkConvertConfig create()
Returns a newNkConvertConfiginstance allocated withBufferUtils.
-
create
public static NkConvertConfig create(long address)
Returns a newNkConvertConfiginstance for the specified memory address.
-
createSafe
@Nullable public static NkConvertConfig createSafe(long address)
-
malloc
public static NkConvertConfig.Buffer malloc(int capacity)
Returns a newNkConvertConfig.Bufferinstance allocated withmemAlloc. The instance must be explicitly freed.- Parameters:
capacity- the buffer capacity
-
calloc
public static NkConvertConfig.Buffer calloc(int capacity)
Returns a newNkConvertConfig.Bufferinstance allocated withmemCalloc. The instance must be explicitly freed.- Parameters:
capacity- the buffer capacity
-
create
public static NkConvertConfig.Buffer create(int capacity)
Returns a newNkConvertConfig.Bufferinstance allocated withBufferUtils.- Parameters:
capacity- the buffer capacity
-
create
public static NkConvertConfig.Buffer create(long address, int capacity)
Create aNkConvertConfig.Bufferinstance at the specified memory.- Parameters:
address- the memory addresscapacity- the buffer capacity
-
createSafe
@Nullable public static NkConvertConfig.Buffer createSafe(long address, int capacity)
-
mallocStack
public static NkConvertConfig mallocStack()
Returns a newNkConvertConfiginstance allocated on the thread-localMemoryStack.
-
callocStack
public static NkConvertConfig callocStack()
Returns a newNkConvertConfiginstance allocated on the thread-localMemoryStackand initializes all its bits to zero.
-
mallocStack
public static NkConvertConfig mallocStack(org.lwjgl.system.MemoryStack stack)
Returns a newNkConvertConfiginstance allocated on the specifiedMemoryStack.- Parameters:
stack- the stack from which to allocate
-
callocStack
public static NkConvertConfig callocStack(org.lwjgl.system.MemoryStack stack)
Returns a newNkConvertConfiginstance allocated on the specifiedMemoryStackand initializes all its bits to zero.- Parameters:
stack- the stack from which to allocate
-
mallocStack
public static NkConvertConfig.Buffer mallocStack(int capacity)
Returns a newNkConvertConfig.Bufferinstance allocated on the thread-localMemoryStack.- Parameters:
capacity- the buffer capacity
-
callocStack
public static NkConvertConfig.Buffer callocStack(int capacity)
Returns a newNkConvertConfig.Bufferinstance allocated on the thread-localMemoryStackand initializes all its bits to zero.- Parameters:
capacity- the buffer capacity
-
mallocStack
public static NkConvertConfig.Buffer mallocStack(int capacity, org.lwjgl.system.MemoryStack stack)
Returns a newNkConvertConfig.Bufferinstance allocated on the specifiedMemoryStack.- Parameters:
stack- the stack from which to allocatecapacity- the buffer capacity
-
callocStack
public static NkConvertConfig.Buffer callocStack(int capacity, org.lwjgl.system.MemoryStack stack)
Returns a newNkConvertConfig.Bufferinstance allocated on the specifiedMemoryStackand initializes all its bits to zero.- Parameters:
stack- the stack from which to allocatecapacity- the buffer capacity
-
nglobal_alpha
public static float nglobal_alpha(long struct)
Unsafe version ofglobal_alpha().
-
nline_AA
public static int nline_AA(long struct)
Unsafe version ofline_AA().
-
nshape_AA
public static int nshape_AA(long struct)
Unsafe version ofshape_AA().
-
ncircle_segment_count
public static int ncircle_segment_count(long struct)
Unsafe version ofcircle_segment_count().
-
narc_segment_count
public static int narc_segment_count(long struct)
Unsafe version ofarc_segment_count().
-
ncurve_segment_count
public static int ncurve_segment_count(long struct)
Unsafe version ofcurve_segment_count().
-
nnull_texture
public static NkDrawNullTexture nnull_texture(long struct)
Unsafe version ofnull_texture().
-
nvertex_layout
public static NkDrawVertexLayoutElement.Buffer nvertex_layout(long struct, int capacity)
Unsafe version ofvertex_layout(int).
-
nvertex_size
public static long nvertex_size(long struct)
Unsafe version ofvertex_size().
-
nvertex_alignment
public static long nvertex_alignment(long struct)
Unsafe version ofvertex_alignment().
-
nglobal_alpha
public static void nglobal_alpha(long struct, float value)Unsafe version ofglobal_alpha.
-
nline_AA
public static void nline_AA(long struct, int value)Unsafe version ofline_AA.
-
nshape_AA
public static void nshape_AA(long struct, int value)Unsafe version ofshape_AA.
-
ncircle_segment_count
public static void ncircle_segment_count(long struct, int value)Unsafe version ofcircle_segment_count.
-
narc_segment_count
public static void narc_segment_count(long struct, int value)Unsafe version ofarc_segment_count.
-
ncurve_segment_count
public static void ncurve_segment_count(long struct, int value)Unsafe version ofcurve_segment_count.
-
nnull_texture
public static void nnull_texture(long struct, NkDrawNullTexture value)Unsafe version ofnull_texture.
-
nvertex_layout
public static void nvertex_layout(long struct, NkDrawVertexLayoutElement.Buffer value)Unsafe version ofvertex_layout.
-
nvertex_size
public static void nvertex_size(long struct, long value)Unsafe version ofvertex_size.
-
nvertex_alignment
public static void nvertex_alignment(long struct, long value)Unsafe version ofvertex_alignment.
-
validate
public static void validate(long struct)
Validates pointer members that should not beNULL.- Parameters:
struct- the struct to validate
-
validate
public static void validate(long array, int count)Callsvalidate(long)for each struct contained in the specified struct array.- Parameters:
array- the struct array to validatecount- the number of structs inarray
-
-