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.NativeResource
Member 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_OFF
ANTI_ALIASING_ON
shape_AA
– shape anti-aliasing flag can be turned off if you are tight on memory. One of:ANTI_ALIASING_OFF
ANTI_ALIASING_ON
circle_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_texture
null_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 class
NkConvertConfig.Buffer
An array ofNkConvertConfig
structs.
-
Field Summary
Fields Modifier and Type Field Description static int
ALIGNOF
The struct alignment in bytes.static int
ARC_SEGMENT_COUNT
CIRCLE_SEGMENT_COUNT
CURVE_SEGMENT_COUNT
GLOBAL_ALPHA
LINE_AA
NULL_TEXTURE
SHAPE_AAThe struct member offsets.static int
SIZEOF
The struct size in bytes.static int
VERTEX_ALIGNMENT
VERTEX_LAYOUT
VERTEX_SIZEThe struct member offsets.
-
Constructor Summary
Constructors Constructor Description NkConvertConfig(java.nio.ByteBuffer container)
Creates aNkConvertConfig
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
arc_segment_count()
Returns the value of thearc_segment_count
field.NkConvertConfig
arc_segment_count(int value)
Sets the specified value to thearc_segment_count
field.static NkConvertConfig
calloc()
Returns a newNkConvertConfig
instance allocated withmemCalloc
.static NkConvertConfig.Buffer
calloc(int capacity)
Returns a newNkConvertConfig.Buffer
instance allocated withmemCalloc
.static NkConvertConfig
callocStack()
Returns a newNkConvertConfig
instance allocated on the thread-localMemoryStack
and initializes all its bits to zero.static NkConvertConfig.Buffer
callocStack(int capacity)
Returns a newNkConvertConfig.Buffer
instance allocated on the thread-localMemoryStack
and initializes all its bits to zero.static NkConvertConfig.Buffer
callocStack(int capacity, org.lwjgl.system.MemoryStack stack)
Returns a newNkConvertConfig.Buffer
instance allocated on the specifiedMemoryStack
and initializes all its bits to zero.static NkConvertConfig
callocStack(org.lwjgl.system.MemoryStack stack)
Returns a newNkConvertConfig
instance allocated on the specifiedMemoryStack
and initializes all its bits to zero.int
circle_segment_count()
Returns the value of thecircle_segment_count
field.NkConvertConfig
circle_segment_count(int value)
Sets the specified value to thecircle_segment_count
field.static NkConvertConfig
create()
Returns a newNkConvertConfig
instance allocated withBufferUtils
.static NkConvertConfig.Buffer
create(int capacity)
Returns a newNkConvertConfig.Buffer
instance allocated withBufferUtils
.static NkConvertConfig
create(long address)
Returns a newNkConvertConfig
instance for the specified memory address.static NkConvertConfig.Buffer
create(long address, int capacity)
Create aNkConvertConfig.Buffer
instance at the specified memory.static NkConvertConfig
createSafe(long address)
static NkConvertConfig.Buffer
createSafe(long address, int capacity)
int
curve_segment_count()
Returns the value of thecurve_segment_count
field.NkConvertConfig
curve_segment_count(int value)
Sets the specified value to thecurve_segment_count
field.float
global_alpha()
Returns the value of theglobal_alpha
field.NkConvertConfig
global_alpha(float value)
Sets the specified value to theglobal_alpha
field.int
line_AA()
Returns the value of theline_AA
field.NkConvertConfig
line_AA(int value)
Sets the specified value to theline_AA
field.static NkConvertConfig
malloc()
Returns a newNkConvertConfig
instance allocated withmemAlloc
.static NkConvertConfig.Buffer
malloc(int capacity)
Returns a newNkConvertConfig.Buffer
instance allocated withmemAlloc
.static NkConvertConfig
mallocStack()
Returns a newNkConvertConfig
instance allocated on the thread-localMemoryStack
.static NkConvertConfig.Buffer
mallocStack(int capacity)
Returns a newNkConvertConfig.Buffer
instance allocated on the thread-localMemoryStack
.static NkConvertConfig.Buffer
mallocStack(int capacity, org.lwjgl.system.MemoryStack stack)
Returns a newNkConvertConfig.Buffer
instance allocated on the specifiedMemoryStack
.static NkConvertConfig
mallocStack(org.lwjgl.system.MemoryStack stack)
Returns a newNkConvertConfig
instance allocated on the specifiedMemoryStack
.static int
narc_segment_count(long struct)
Unsafe version ofarc_segment_count()
.static void
narc_segment_count(long struct, int value)
Unsafe version ofarc_segment_count
.static int
ncircle_segment_count(long struct)
Unsafe version ofcircle_segment_count()
.static void
ncircle_segment_count(long struct, int value)
Unsafe version ofcircle_segment_count
.static int
ncurve_segment_count(long struct)
Unsafe version ofcurve_segment_count()
.static void
ncurve_segment_count(long struct, int value)
Unsafe version ofcurve_segment_count
.static float
nglobal_alpha(long struct)
Unsafe version ofglobal_alpha()
.static void
nglobal_alpha(long struct, float value)
Unsafe version ofglobal_alpha
.static int
nline_AA(long struct)
Unsafe version ofline_AA()
.static void
nline_AA(long struct, int value)
Unsafe version ofline_AA
.static NkDrawNullTexture
nnull_texture(long struct)
Unsafe version ofnull_texture()
.static void
nnull_texture(long struct, NkDrawNullTexture value)
Unsafe version ofnull_texture
.static int
nshape_AA(long struct)
Unsafe version ofshape_AA()
.static void
nshape_AA(long struct, int value)
Unsafe version ofshape_AA
.NkDrawNullTexture
null_texture()
Returns aNkDrawNullTexture
view of thenull_texture
field.NkConvertConfig
null_texture(java.util.function.Consumer<NkDrawNullTexture> consumer)
Passes thenull_texture
field to the specifiedConsumer
.NkConvertConfig
null_texture(NkDrawNullTexture value)
Copies the specifiedNkDrawNullTexture
to thenull_texture
field.static long
nvertex_alignment(long struct)
Unsafe version ofvertex_alignment()
.static void
nvertex_alignment(long struct, long value)
Unsafe version ofvertex_alignment
.static NkDrawVertexLayoutElement.Buffer
nvertex_layout(long struct, int capacity)
Unsafe version ofvertex_layout(int)
.static void
nvertex_layout(long struct, NkDrawVertexLayoutElement.Buffer value)
Unsafe version ofvertex_layout
.static long
nvertex_size(long struct)
Unsafe version ofvertex_size()
.static void
nvertex_size(long struct, long value)
Unsafe version ofvertex_size
.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.NkConvertConfig
set(NkConvertConfig src)
Copies the specified struct data to this struct.int
shape_AA()
Returns the value of theshape_AA
field.NkConvertConfig
shape_AA(int value)
Sets the specified value to theshape_AA
field.int
sizeof()
static void
validate(long struct)
Validates pointer members that should not beNULL
.static void
validate(long array, int count)
Callsvalidate(long)
for each struct contained in the specified struct array.long
vertex_alignment()
Returns the value of thevertex_alignment
field.NkConvertConfig
vertex_alignment(long value)
Sets the specified value to thevertex_alignment
field.NkDrawVertexLayoutElement.Buffer
vertex_layout(int capacity)
Returns aNkDrawVertexLayoutElement.Buffer
view of the struct array pointed to by thevertex_layout
field.NkConvertConfig
vertex_layout(NkDrawVertexLayoutElement.Buffer value)
Sets the address of the specifiedNkDrawVertexLayoutElement.Buffer
to thevertex_layout
field.long
vertex_size()
Returns the value of thevertex_size
field.NkConvertConfig
vertex_size(long value)
Sets the specified value to thevertex_size
field.
-
-
-
Constructor Detail
-
NkConvertConfig
public NkConvertConfig(java.nio.ByteBuffer container)
Creates aNkConvertConfig
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
-
global_alpha
public float global_alpha()
Returns the value of theglobal_alpha
field.
-
line_AA
public int line_AA()
Returns the value of theline_AA
field.
-
shape_AA
public int shape_AA()
Returns the value of theshape_AA
field.
-
circle_segment_count
public int circle_segment_count()
Returns the value of thecircle_segment_count
field.
-
arc_segment_count
public int arc_segment_count()
Returns the value of thearc_segment_count
field.
-
curve_segment_count
public int curve_segment_count()
Returns the value of thecurve_segment_count
field.
-
null_texture
public NkDrawNullTexture null_texture()
Returns aNkDrawNullTexture
view of thenull_texture
field.
-
vertex_layout
public NkDrawVertexLayoutElement.Buffer vertex_layout(int capacity)
Returns aNkDrawVertexLayoutElement.Buffer
view of the struct array pointed to by thevertex_layout
field.- Parameters:
capacity
- the number of elements in the returned buffer
-
vertex_size
public long vertex_size()
Returns the value of thevertex_size
field.
-
vertex_alignment
public long vertex_alignment()
Returns the value of thevertex_alignment
field.
-
global_alpha
public NkConvertConfig global_alpha(float value)
Sets the specified value to theglobal_alpha
field.
-
line_AA
public NkConvertConfig line_AA(int value)
Sets the specified value to theline_AA
field.
-
shape_AA
public NkConvertConfig shape_AA(int value)
Sets the specified value to theshape_AA
field.
-
circle_segment_count
public NkConvertConfig circle_segment_count(int value)
Sets the specified value to thecircle_segment_count
field.
-
arc_segment_count
public NkConvertConfig arc_segment_count(int value)
Sets the specified value to thearc_segment_count
field.
-
curve_segment_count
public NkConvertConfig curve_segment_count(int value)
Sets the specified value to thecurve_segment_count
field.
-
null_texture
public NkConvertConfig null_texture(NkDrawNullTexture value)
Copies the specifiedNkDrawNullTexture
to thenull_texture
field.
-
null_texture
public NkConvertConfig null_texture(java.util.function.Consumer<NkDrawNullTexture> consumer)
Passes thenull_texture
field to the specifiedConsumer
.
-
vertex_layout
public NkConvertConfig vertex_layout(NkDrawVertexLayoutElement.Buffer value)
Sets the address of the specifiedNkDrawVertexLayoutElement.Buffer
to thevertex_layout
field.
-
vertex_size
public NkConvertConfig vertex_size(long value)
Sets the specified value to thevertex_size
field.
-
vertex_alignment
public NkConvertConfig vertex_alignment(long value)
Sets the specified value to thevertex_alignment
field.
-
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 newNkConvertConfig
instance allocated withmemAlloc
. The instance must be explicitly freed.
-
calloc
public static NkConvertConfig calloc()
Returns a newNkConvertConfig
instance allocated withmemCalloc
. The instance must be explicitly freed.
-
create
public static NkConvertConfig create()
Returns a newNkConvertConfig
instance allocated withBufferUtils
.
-
create
public static NkConvertConfig create(long address)
Returns a newNkConvertConfig
instance for the specified memory address.
-
createSafe
@Nullable public static NkConvertConfig createSafe(long address)
-
malloc
public static NkConvertConfig.Buffer malloc(int capacity)
Returns a newNkConvertConfig.Buffer
instance allocated withmemAlloc
. The instance must be explicitly freed.- Parameters:
capacity
- the buffer capacity
-
calloc
public static NkConvertConfig.Buffer calloc(int capacity)
Returns a newNkConvertConfig.Buffer
instance allocated withmemCalloc
. The instance must be explicitly freed.- Parameters:
capacity
- the buffer capacity
-
create
public static NkConvertConfig.Buffer create(int capacity)
Returns a newNkConvertConfig.Buffer
instance allocated withBufferUtils
.- Parameters:
capacity
- the buffer capacity
-
create
public static NkConvertConfig.Buffer create(long address, int capacity)
Create aNkConvertConfig.Buffer
instance 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 newNkConvertConfig
instance allocated on the thread-localMemoryStack
.
-
callocStack
public static NkConvertConfig callocStack()
Returns a newNkConvertConfig
instance allocated on the thread-localMemoryStack
and initializes all its bits to zero.
-
mallocStack
public static NkConvertConfig mallocStack(org.lwjgl.system.MemoryStack stack)
Returns a newNkConvertConfig
instance allocated on the specifiedMemoryStack
.- Parameters:
stack
- the stack from which to allocate
-
callocStack
public static NkConvertConfig callocStack(org.lwjgl.system.MemoryStack stack)
Returns a newNkConvertConfig
instance allocated on the specifiedMemoryStack
and 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.Buffer
instance allocated on the thread-localMemoryStack
.- Parameters:
capacity
- the buffer capacity
-
callocStack
public static NkConvertConfig.Buffer callocStack(int capacity)
Returns a newNkConvertConfig.Buffer
instance allocated on the thread-localMemoryStack
and 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.Buffer
instance 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.Buffer
instance allocated on the specifiedMemoryStack
and 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
-
-