Package org.lwjgl.bgfx
Class BGFXTransientVertexBuffer
- java.lang.Object
-
- org.lwjgl.system.Pointer.Default
-
- org.lwjgl.system.Struct
-
- org.lwjgl.bgfx.BGFXTransientVertexBuffer
-
- All Implemented Interfaces:
java.lang.AutoCloseable
,org.lwjgl.system.NativeResource
,org.lwjgl.system.Pointer
public class BGFXTransientVertexBuffer extends org.lwjgl.system.Struct implements org.lwjgl.system.NativeResource
Transient vertex buffer.Member documentation
data
– pointer to datasize
– data sizestartVertex
– first vertexstride
– vertex stridehandle
– vertex buffer handlelayoutHandle
– vertex layout handle
Layout
struct bgfx_transient_vertex_buffer_t { uint8_t * data; uint32_t size; uint32_t startVertex; uint16_t stride; bgfx_vertex_buffer_handle_t handle; bgfx_vertex_layout_handle_t layoutHandle; }
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
BGFXTransientVertexBuffer.Buffer
An array ofBGFXTransientVertexBuffer
structs.
-
Field Summary
Fields Modifier and Type Field Description static int
ALIGNOF
The struct alignment in bytes.static int
DATA
HANDLE
LAYOUTHANDLE
SIZEThe struct member offsets.static int
SIZEOF
The struct size in bytes.static int
STARTVERTEX
STRIDEThe struct member offsets.
-
Constructor Summary
Constructors Constructor Description BGFXTransientVertexBuffer(java.nio.ByteBuffer container)
Creates aBGFXTransientVertexBuffer
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 BGFXTransientVertexBuffer
calloc()
Returns a newBGFXTransientVertexBuffer
instance allocated withmemCalloc
.static BGFXTransientVertexBuffer.Buffer
calloc(int capacity)
Returns a newBGFXTransientVertexBuffer.Buffer
instance allocated withmemCalloc
.static BGFXTransientVertexBuffer
callocStack()
Returns a newBGFXTransientVertexBuffer
instance allocated on the thread-localMemoryStack
and initializes all its bits to zero.static BGFXTransientVertexBuffer.Buffer
callocStack(int capacity)
Returns a newBGFXTransientVertexBuffer.Buffer
instance allocated on the thread-localMemoryStack
and initializes all its bits to zero.static BGFXTransientVertexBuffer.Buffer
callocStack(int capacity, org.lwjgl.system.MemoryStack stack)
Returns a newBGFXTransientVertexBuffer.Buffer
instance allocated on the specifiedMemoryStack
and initializes all its bits to zero.static BGFXTransientVertexBuffer
callocStack(org.lwjgl.system.MemoryStack stack)
Returns a newBGFXTransientVertexBuffer
instance allocated on the specifiedMemoryStack
and initializes all its bits to zero.static BGFXTransientVertexBuffer
create()
Returns a newBGFXTransientVertexBuffer
instance allocated withBufferUtils
.static BGFXTransientVertexBuffer.Buffer
create(int capacity)
Returns a newBGFXTransientVertexBuffer.Buffer
instance allocated withBufferUtils
.static BGFXTransientVertexBuffer
create(long address)
Returns a newBGFXTransientVertexBuffer
instance for the specified memory address.static BGFXTransientVertexBuffer.Buffer
create(long address, int capacity)
Create aBGFXTransientVertexBuffer.Buffer
instance at the specified memory.static BGFXTransientVertexBuffer
createSafe(long address)
static BGFXTransientVertexBuffer.Buffer
createSafe(long address, int capacity)
java.nio.ByteBuffer
data()
Returns aByteBuffer
view of the data pointed to by thedata
field.BGFXTransientVertexBuffer
data(java.nio.ByteBuffer value)
Sets the address of the specifiedByteBuffer
to thedata
field.short
handle()
Returns the value of thehandle
field.BGFXTransientVertexBuffer
handle(short value)
Sets the specified value to thehandle
field.short
layoutHandle()
Returns the value of thelayoutHandle
field.BGFXTransientVertexBuffer
layoutHandle(short value)
Sets the specified value to thelayoutHandle
field.static BGFXTransientVertexBuffer
malloc()
Returns a newBGFXTransientVertexBuffer
instance allocated withmemAlloc
.static BGFXTransientVertexBuffer.Buffer
malloc(int capacity)
Returns a newBGFXTransientVertexBuffer.Buffer
instance allocated withmemAlloc
.static BGFXTransientVertexBuffer
mallocStack()
Returns a newBGFXTransientVertexBuffer
instance allocated on the thread-localMemoryStack
.static BGFXTransientVertexBuffer.Buffer
mallocStack(int capacity)
Returns a newBGFXTransientVertexBuffer.Buffer
instance allocated on the thread-localMemoryStack
.static BGFXTransientVertexBuffer.Buffer
mallocStack(int capacity, org.lwjgl.system.MemoryStack stack)
Returns a newBGFXTransientVertexBuffer.Buffer
instance allocated on the specifiedMemoryStack
.static BGFXTransientVertexBuffer
mallocStack(org.lwjgl.system.MemoryStack stack)
Returns a newBGFXTransientVertexBuffer
instance allocated on the specifiedMemoryStack
.static java.nio.ByteBuffer
ndata(long struct)
Unsafe version ofdata
.static void
ndata(long struct, java.nio.ByteBuffer value)
Unsafe version ofdata
.static short
nhandle(long struct)
Unsafe version ofhandle()
.static void
nhandle(long struct, short value)
Unsafe version ofhandle
.static short
nlayoutHandle(long struct)
Unsafe version oflayoutHandle()
.static void
nlayoutHandle(long struct, short value)
Unsafe version oflayoutHandle
.static int
nsize(long struct)
Unsafe version ofsize()
.static void
nsize(long struct, int value)
Sets the specified value to thesize
field of the specifiedstruct
.static int
nstartVertex(long struct)
Unsafe version ofstartVertex()
.static void
nstartVertex(long struct, int value)
Unsafe version ofstartVertex
.static short
nstride(long struct)
Unsafe version ofstride()
.static void
nstride(long struct, short value)
Unsafe version ofstride
.BGFXTransientVertexBuffer
set(java.nio.ByteBuffer data, int startVertex, short stride, short handle, short layoutHandle)
Initializes this struct with the specified values.BGFXTransientVertexBuffer
set(BGFXTransientVertexBuffer src)
Copies the specified struct data to this struct.int
size()
Returns the value of thesize
field.int
sizeof()
int
startVertex()
Returns the value of thestartVertex
field.BGFXTransientVertexBuffer
startVertex(int value)
Sets the specified value to thestartVertex
field.short
stride()
Returns the value of thestride
field.BGFXTransientVertexBuffer
stride(short value)
Sets the specified value to thestride
field.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.
-
-
-
Constructor Detail
-
BGFXTransientVertexBuffer
public BGFXTransientVertexBuffer(java.nio.ByteBuffer container)
Creates aBGFXTransientVertexBuffer
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
-
data
public java.nio.ByteBuffer data()
Returns aByteBuffer
view of the data pointed to by thedata
field.
-
size
public int size()
Returns the value of thesize
field.
-
startVertex
public int startVertex()
Returns the value of thestartVertex
field.
-
stride
public short stride()
Returns the value of thestride
field.
-
handle
public short handle()
Returns the value of thehandle
field.
-
layoutHandle
public short layoutHandle()
Returns the value of thelayoutHandle
field.
-
data
public BGFXTransientVertexBuffer data(java.nio.ByteBuffer value)
Sets the address of the specifiedByteBuffer
to thedata
field.
-
startVertex
public BGFXTransientVertexBuffer startVertex(int value)
Sets the specified value to thestartVertex
field.
-
stride
public BGFXTransientVertexBuffer stride(short value)
Sets the specified value to thestride
field.
-
handle
public BGFXTransientVertexBuffer handle(short value)
Sets the specified value to thehandle
field.
-
layoutHandle
public BGFXTransientVertexBuffer layoutHandle(short value)
Sets the specified value to thelayoutHandle
field.
-
set
public BGFXTransientVertexBuffer set(java.nio.ByteBuffer data, int startVertex, short stride, short handle, short layoutHandle)
Initializes this struct with the specified values.
-
set
public BGFXTransientVertexBuffer set(BGFXTransientVertexBuffer src)
Copies the specified struct data to this struct.- Parameters:
src
- the source struct- Returns:
- this struct
-
malloc
public static BGFXTransientVertexBuffer malloc()
Returns a newBGFXTransientVertexBuffer
instance allocated withmemAlloc
. The instance must be explicitly freed.
-
calloc
public static BGFXTransientVertexBuffer calloc()
Returns a newBGFXTransientVertexBuffer
instance allocated withmemCalloc
. The instance must be explicitly freed.
-
create
public static BGFXTransientVertexBuffer create()
Returns a newBGFXTransientVertexBuffer
instance allocated withBufferUtils
.
-
create
public static BGFXTransientVertexBuffer create(long address)
Returns a newBGFXTransientVertexBuffer
instance for the specified memory address.
-
createSafe
@Nullable public static BGFXTransientVertexBuffer createSafe(long address)
-
malloc
public static BGFXTransientVertexBuffer.Buffer malloc(int capacity)
Returns a newBGFXTransientVertexBuffer.Buffer
instance allocated withmemAlloc
. The instance must be explicitly freed.- Parameters:
capacity
- the buffer capacity
-
calloc
public static BGFXTransientVertexBuffer.Buffer calloc(int capacity)
Returns a newBGFXTransientVertexBuffer.Buffer
instance allocated withmemCalloc
. The instance must be explicitly freed.- Parameters:
capacity
- the buffer capacity
-
create
public static BGFXTransientVertexBuffer.Buffer create(int capacity)
Returns a newBGFXTransientVertexBuffer.Buffer
instance allocated withBufferUtils
.- Parameters:
capacity
- the buffer capacity
-
create
public static BGFXTransientVertexBuffer.Buffer create(long address, int capacity)
Create aBGFXTransientVertexBuffer.Buffer
instance at the specified memory.- Parameters:
address
- the memory addresscapacity
- the buffer capacity
-
createSafe
@Nullable public static BGFXTransientVertexBuffer.Buffer createSafe(long address, int capacity)
-
mallocStack
public static BGFXTransientVertexBuffer mallocStack()
Returns a newBGFXTransientVertexBuffer
instance allocated on the thread-localMemoryStack
.
-
callocStack
public static BGFXTransientVertexBuffer callocStack()
Returns a newBGFXTransientVertexBuffer
instance allocated on the thread-localMemoryStack
and initializes all its bits to zero.
-
mallocStack
public static BGFXTransientVertexBuffer mallocStack(org.lwjgl.system.MemoryStack stack)
Returns a newBGFXTransientVertexBuffer
instance allocated on the specifiedMemoryStack
.- Parameters:
stack
- the stack from which to allocate
-
callocStack
public static BGFXTransientVertexBuffer callocStack(org.lwjgl.system.MemoryStack stack)
Returns a newBGFXTransientVertexBuffer
instance allocated on the specifiedMemoryStack
and initializes all its bits to zero.- Parameters:
stack
- the stack from which to allocate
-
mallocStack
public static BGFXTransientVertexBuffer.Buffer mallocStack(int capacity)
Returns a newBGFXTransientVertexBuffer.Buffer
instance allocated on the thread-localMemoryStack
.- Parameters:
capacity
- the buffer capacity
-
callocStack
public static BGFXTransientVertexBuffer.Buffer callocStack(int capacity)
Returns a newBGFXTransientVertexBuffer.Buffer
instance allocated on the thread-localMemoryStack
and initializes all its bits to zero.- Parameters:
capacity
- the buffer capacity
-
mallocStack
public static BGFXTransientVertexBuffer.Buffer mallocStack(int capacity, org.lwjgl.system.MemoryStack stack)
Returns a newBGFXTransientVertexBuffer.Buffer
instance allocated on the specifiedMemoryStack
.- Parameters:
stack
- the stack from which to allocatecapacity
- the buffer capacity
-
callocStack
public static BGFXTransientVertexBuffer.Buffer callocStack(int capacity, org.lwjgl.system.MemoryStack stack)
Returns a newBGFXTransientVertexBuffer.Buffer
instance allocated on the specifiedMemoryStack
and initializes all its bits to zero.- Parameters:
stack
- the stack from which to allocatecapacity
- the buffer capacity
-
ndata
public static java.nio.ByteBuffer ndata(long struct)
Unsafe version ofdata
.
-
nsize
public static int nsize(long struct)
Unsafe version ofsize()
.
-
nstartVertex
public static int nstartVertex(long struct)
Unsafe version ofstartVertex()
.
-
nstride
public static short nstride(long struct)
Unsafe version ofstride()
.
-
nhandle
public static short nhandle(long struct)
Unsafe version ofhandle()
.
-
nlayoutHandle
public static short nlayoutHandle(long struct)
Unsafe version oflayoutHandle()
.
-
ndata
public static void ndata(long struct, java.nio.ByteBuffer value)
Unsafe version ofdata
.
-
nsize
public static void nsize(long struct, int value)
Sets the specified value to thesize
field of the specifiedstruct
.
-
nstartVertex
public static void nstartVertex(long struct, int value)
Unsafe version ofstartVertex
.
-
nstride
public static void nstride(long struct, short value)
Unsafe version ofstride
.
-
nhandle
public static void nhandle(long struct, short value)
Unsafe version ofhandle
.
-
nlayoutHandle
public static void nlayoutHandle(long struct, short value)
Unsafe version oflayoutHandle
.
-
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
-
-