Package org.lwjgl.bgfx
Class BGFXUniformInfo
- java.lang.Object
-
- org.lwjgl.system.Pointer.Default
-
- org.lwjgl.system.Struct
-
- org.lwjgl.bgfx.BGFXUniformInfo
-
- All Implemented Interfaces:
java.lang.AutoCloseable
,org.lwjgl.system.NativeResource
,org.lwjgl.system.Pointer
public class BGFXUniformInfo extends org.lwjgl.system.Struct implements org.lwjgl.system.NativeResource
Uniform info.Member documentation
name[256]
– uniform nametype
– uniform typenum
– number of elements in array
Layout
struct bgfx_uniform_info_t { char name[256]; bgfx_uniform_type_t type; uint16_t num; }
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
BGFXUniformInfo.Buffer
An array ofBGFXUniformInfo
structs.
-
Constructor Summary
Constructors Constructor Description BGFXUniformInfo(java.nio.ByteBuffer container)
Creates aBGFXUniformInfo
instance at the current position of the specifiedByteBuffer
container.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static BGFXUniformInfo
calloc()
Returns a newBGFXUniformInfo
instance allocated withmemCalloc
.static BGFXUniformInfo.Buffer
calloc(int capacity)
Returns a newBGFXUniformInfo.Buffer
instance allocated withmemCalloc
.static BGFXUniformInfo
callocStack()
Returns a newBGFXUniformInfo
instance allocated on the thread-localMemoryStack
and initializes all its bits to zero.static BGFXUniformInfo.Buffer
callocStack(int capacity)
Returns a newBGFXUniformInfo.Buffer
instance allocated on the thread-localMemoryStack
and initializes all its bits to zero.static BGFXUniformInfo.Buffer
callocStack(int capacity, org.lwjgl.system.MemoryStack stack)
Returns a newBGFXUniformInfo.Buffer
instance allocated on the specifiedMemoryStack
and initializes all its bits to zero.static BGFXUniformInfo
callocStack(org.lwjgl.system.MemoryStack stack)
Returns a newBGFXUniformInfo
instance allocated on the specifiedMemoryStack
and initializes all its bits to zero.static BGFXUniformInfo
create()
Returns a newBGFXUniformInfo
instance allocated withBufferUtils
.static BGFXUniformInfo.Buffer
create(int capacity)
Returns a newBGFXUniformInfo.Buffer
instance allocated withBufferUtils
.static BGFXUniformInfo
create(long address)
Returns a newBGFXUniformInfo
instance for the specified memory address.static BGFXUniformInfo.Buffer
create(long address, int capacity)
Create aBGFXUniformInfo.Buffer
instance at the specified memory.static BGFXUniformInfo
createSafe(long address)
static BGFXUniformInfo.Buffer
createSafe(long address, int capacity)
static BGFXUniformInfo
malloc()
Returns a newBGFXUniformInfo
instance allocated withmemAlloc
.static BGFXUniformInfo.Buffer
malloc(int capacity)
Returns a newBGFXUniformInfo.Buffer
instance allocated withmemAlloc
.static BGFXUniformInfo
mallocStack()
Returns a newBGFXUniformInfo
instance allocated on the thread-localMemoryStack
.static BGFXUniformInfo.Buffer
mallocStack(int capacity)
Returns a newBGFXUniformInfo.Buffer
instance allocated on the thread-localMemoryStack
.static BGFXUniformInfo.Buffer
mallocStack(int capacity, org.lwjgl.system.MemoryStack stack)
Returns a newBGFXUniformInfo.Buffer
instance allocated on the specifiedMemoryStack
.static BGFXUniformInfo
mallocStack(org.lwjgl.system.MemoryStack stack)
Returns a newBGFXUniformInfo
instance allocated on the specifiedMemoryStack
.java.nio.ByteBuffer
name()
Returns aByteBuffer
view of thename
field.BGFXUniformInfo
name(java.nio.ByteBuffer value)
Copies the specified encoded string to thename
field.java.lang.String
nameString()
Decodes the null-terminated string stored in thename
field.static java.nio.ByteBuffer
nname(long struct)
Unsafe version ofname()
.static void
nname(long struct, java.nio.ByteBuffer value)
Unsafe version ofname
.static java.lang.String
nnameString(long struct)
Unsafe version ofnameString()
.static short
nnum(long struct)
Unsafe version ofnum()
.static void
nnum(long struct, short value)
Unsafe version ofnum
.static int
ntype(long struct)
Unsafe version oftype()
.static void
ntype(long struct, int value)
Unsafe version oftype
.short
num()
Returns the value of thenum
field.BGFXUniformInfo
num(short value)
Sets the specified value to thenum
field.BGFXUniformInfo
set(java.nio.ByteBuffer name, int type, short num)
Initializes this struct with the specified values.BGFXUniformInfo
set(BGFXUniformInfo src)
Copies the specified struct data to this struct.int
sizeof()
int
type()
Returns the value of thetype
field.BGFXUniformInfo
type(int value)
Sets the specified value to thetype
field.
-
-
-
Constructor Detail
-
BGFXUniformInfo
public BGFXUniformInfo(java.nio.ByteBuffer container)
Creates aBGFXUniformInfo
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
-
name
public java.nio.ByteBuffer name()
Returns aByteBuffer
view of thename
field.
-
nameString
public java.lang.String nameString()
Decodes the null-terminated string stored in thename
field.
-
type
public int type()
Returns the value of thetype
field.
-
num
public short num()
Returns the value of thenum
field.
-
name
public BGFXUniformInfo name(java.nio.ByteBuffer value)
Copies the specified encoded string to thename
field.
-
type
public BGFXUniformInfo type(int value)
Sets the specified value to thetype
field.
-
num
public BGFXUniformInfo num(short value)
Sets the specified value to thenum
field.
-
set
public BGFXUniformInfo set(java.nio.ByteBuffer name, int type, short num)
Initializes this struct with the specified values.
-
set
public BGFXUniformInfo set(BGFXUniformInfo src)
Copies the specified struct data to this struct.- Parameters:
src
- the source struct- Returns:
- this struct
-
malloc
public static BGFXUniformInfo malloc()
Returns a newBGFXUniformInfo
instance allocated withmemAlloc
. The instance must be explicitly freed.
-
calloc
public static BGFXUniformInfo calloc()
Returns a newBGFXUniformInfo
instance allocated withmemCalloc
. The instance must be explicitly freed.
-
create
public static BGFXUniformInfo create()
Returns a newBGFXUniformInfo
instance allocated withBufferUtils
.
-
create
public static BGFXUniformInfo create(long address)
Returns a newBGFXUniformInfo
instance for the specified memory address.
-
createSafe
@Nullable public static BGFXUniformInfo createSafe(long address)
-
malloc
public static BGFXUniformInfo.Buffer malloc(int capacity)
Returns a newBGFXUniformInfo.Buffer
instance allocated withmemAlloc
. The instance must be explicitly freed.- Parameters:
capacity
- the buffer capacity
-
calloc
public static BGFXUniformInfo.Buffer calloc(int capacity)
Returns a newBGFXUniformInfo.Buffer
instance allocated withmemCalloc
. The instance must be explicitly freed.- Parameters:
capacity
- the buffer capacity
-
create
public static BGFXUniformInfo.Buffer create(int capacity)
Returns a newBGFXUniformInfo.Buffer
instance allocated withBufferUtils
.- Parameters:
capacity
- the buffer capacity
-
create
public static BGFXUniformInfo.Buffer create(long address, int capacity)
Create aBGFXUniformInfo.Buffer
instance at the specified memory.- Parameters:
address
- the memory addresscapacity
- the buffer capacity
-
createSafe
@Nullable public static BGFXUniformInfo.Buffer createSafe(long address, int capacity)
-
mallocStack
public static BGFXUniformInfo mallocStack()
Returns a newBGFXUniformInfo
instance allocated on the thread-localMemoryStack
.
-
callocStack
public static BGFXUniformInfo callocStack()
Returns a newBGFXUniformInfo
instance allocated on the thread-localMemoryStack
and initializes all its bits to zero.
-
mallocStack
public static BGFXUniformInfo mallocStack(org.lwjgl.system.MemoryStack stack)
Returns a newBGFXUniformInfo
instance allocated on the specifiedMemoryStack
.- Parameters:
stack
- the stack from which to allocate
-
callocStack
public static BGFXUniformInfo callocStack(org.lwjgl.system.MemoryStack stack)
Returns a newBGFXUniformInfo
instance allocated on the specifiedMemoryStack
and initializes all its bits to zero.- Parameters:
stack
- the stack from which to allocate
-
mallocStack
public static BGFXUniformInfo.Buffer mallocStack(int capacity)
Returns a newBGFXUniformInfo.Buffer
instance allocated on the thread-localMemoryStack
.- Parameters:
capacity
- the buffer capacity
-
callocStack
public static BGFXUniformInfo.Buffer callocStack(int capacity)
Returns a newBGFXUniformInfo.Buffer
instance allocated on the thread-localMemoryStack
and initializes all its bits to zero.- Parameters:
capacity
- the buffer capacity
-
mallocStack
public static BGFXUniformInfo.Buffer mallocStack(int capacity, org.lwjgl.system.MemoryStack stack)
Returns a newBGFXUniformInfo.Buffer
instance allocated on the specifiedMemoryStack
.- Parameters:
stack
- the stack from which to allocatecapacity
- the buffer capacity
-
callocStack
public static BGFXUniformInfo.Buffer callocStack(int capacity, org.lwjgl.system.MemoryStack stack)
Returns a newBGFXUniformInfo.Buffer
instance allocated on the specifiedMemoryStack
and initializes all its bits to zero.- Parameters:
stack
- the stack from which to allocatecapacity
- the buffer capacity
-
nname
public static java.nio.ByteBuffer nname(long struct)
Unsafe version ofname()
.
-
nnameString
public static java.lang.String nnameString(long struct)
Unsafe version ofnameString()
.
-
ntype
public static int ntype(long struct)
Unsafe version oftype()
.
-
nnum
public static short nnum(long struct)
Unsafe version ofnum()
.
-
nname
public static void nname(long struct, java.nio.ByteBuffer value)
Unsafe version ofname
.
-
ntype
public static void ntype(long struct, int value)
Unsafe version oftype
.
-
nnum
public static void nnum(long struct, short value)
Unsafe version ofnum
.
-
-