Package org.lwjgl.bgfx
Class BGFXMemory
- java.lang.Object
-
- org.lwjgl.system.Pointer.Default
-
- org.lwjgl.system.Struct
-
- org.lwjgl.bgfx.BGFXMemory
-
- All Implemented Interfaces:
java.lang.AutoCloseable,org.lwjgl.system.NativeResource,org.lwjgl.system.Pointer
public class BGFXMemory extends org.lwjgl.system.Struct implements org.lwjgl.system.NativeResource
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classBGFXMemory.BufferAn array ofBGFXMemorystructs.
-
Constructor Summary
Constructors Constructor Description BGFXMemory(java.nio.ByteBuffer container)Creates aBGFXMemoryinstance at the current position of the specifiedByteBuffercontainer.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description static BGFXMemorycalloc()Returns a newBGFXMemoryinstance allocated withmemCalloc.static BGFXMemory.Buffercalloc(int capacity)Returns a newBGFXMemory.Bufferinstance allocated withmemCalloc.static BGFXMemory.Buffercalloc(int capacity, org.lwjgl.system.MemoryStack stack)Returns a newBGFXMemory.Bufferinstance allocated on the specifiedMemoryStackand initializes all its bits to zero.static BGFXMemorycalloc(org.lwjgl.system.MemoryStack stack)Returns a newBGFXMemoryinstance allocated on the specifiedMemoryStackand initializes all its bits to zero.static BGFXMemorycallocStack()Deprecated.static BGFXMemory.BuffercallocStack(int capacity)Deprecated.static BGFXMemory.BuffercallocStack(int capacity, org.lwjgl.system.MemoryStack stack)Deprecated.static BGFXMemorycallocStack(org.lwjgl.system.MemoryStack stack)Deprecated.static BGFXMemorycreate()Returns a newBGFXMemoryinstance allocated withBufferUtils.static BGFXMemory.Buffercreate(int capacity)Returns a newBGFXMemory.Bufferinstance allocated withBufferUtils.static BGFXMemorycreate(long address)Returns a newBGFXMemoryinstance for the specified memory address.static BGFXMemory.Buffercreate(long address, int capacity)Create aBGFXMemory.Bufferinstance at the specified memory.static BGFXMemorycreateSafe(long address)static BGFXMemory.BuffercreateSafe(long address, int capacity)java.nio.ByteBufferdata()pointer to dataBGFXMemorydata(java.nio.ByteBuffer value)Sets the address of the specifiedByteBufferto thedata()field.static BGFXMemorymalloc()Returns a newBGFXMemoryinstance allocated withmemAlloc.static BGFXMemory.Buffermalloc(int capacity)Returns a newBGFXMemory.Bufferinstance allocated withmemAlloc.static BGFXMemory.Buffermalloc(int capacity, org.lwjgl.system.MemoryStack stack)Returns a newBGFXMemory.Bufferinstance allocated on the specifiedMemoryStack.static BGFXMemorymalloc(org.lwjgl.system.MemoryStack stack)Returns a newBGFXMemoryinstance allocated on the specifiedMemoryStack.static BGFXMemorymallocStack()Deprecated.static BGFXMemory.BuffermallocStack(int capacity)Deprecated.static BGFXMemory.BuffermallocStack(int capacity, org.lwjgl.system.MemoryStack stack)Deprecated.static BGFXMemorymallocStack(org.lwjgl.system.MemoryStack stack)Deprecated.static java.nio.ByteBufferndata(long struct)Unsafe version ofdata.static voidndata(long struct, java.nio.ByteBuffer value)Unsafe version ofdata.static intnsize(long struct)Unsafe version ofsize().static voidnsize(long struct, int value)Sets the specified value to thesizefield of the specifiedstruct.BGFXMemoryset(BGFXMemory src)Copies the specified struct data to this struct.intsize()data sizeintsizeof()static voidvalidate(long struct)Validates pointer members that should not beNULL.
-
-
-
Constructor Detail
-
BGFXMemory
public BGFXMemory(java.nio.ByteBuffer container)
Creates aBGFXMemoryinstance 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
-
data
public java.nio.ByteBuffer data()
pointer to data
-
size
public int size()
data size
-
data
public BGFXMemory data(java.nio.ByteBuffer value)
Sets the address of the specifiedByteBufferto thedata()field.
-
set
public BGFXMemory set(BGFXMemory src)
Copies the specified struct data to this struct.- Parameters:
src- the source struct- Returns:
- this struct
-
malloc
public static BGFXMemory malloc()
Returns a newBGFXMemoryinstance allocated withmemAlloc. The instance must be explicitly freed.
-
calloc
public static BGFXMemory calloc()
Returns a newBGFXMemoryinstance allocated withmemCalloc. The instance must be explicitly freed.
-
create
public static BGFXMemory create()
Returns a newBGFXMemoryinstance allocated withBufferUtils.
-
create
public static BGFXMemory create(long address)
Returns a newBGFXMemoryinstance for the specified memory address.
-
createSafe
@Nullable public static BGFXMemory createSafe(long address)
-
malloc
public static BGFXMemory.Buffer malloc(int capacity)
Returns a newBGFXMemory.Bufferinstance allocated withmemAlloc. The instance must be explicitly freed.- Parameters:
capacity- the buffer capacity
-
calloc
public static BGFXMemory.Buffer calloc(int capacity)
Returns a newBGFXMemory.Bufferinstance allocated withmemCalloc. The instance must be explicitly freed.- Parameters:
capacity- the buffer capacity
-
create
public static BGFXMemory.Buffer create(int capacity)
Returns a newBGFXMemory.Bufferinstance allocated withBufferUtils.- Parameters:
capacity- the buffer capacity
-
create
public static BGFXMemory.Buffer create(long address, int capacity)
Create aBGFXMemory.Bufferinstance at the specified memory.- Parameters:
address- the memory addresscapacity- the buffer capacity
-
createSafe
@Nullable public static BGFXMemory.Buffer createSafe(long address, int capacity)
-
mallocStack
@Deprecated public static BGFXMemory mallocStack()
Deprecated.Deprecated for removal in 3.4.0. Usemalloc(MemoryStack)instead.
-
callocStack
@Deprecated public static BGFXMemory callocStack()
Deprecated.Deprecated for removal in 3.4.0. Usecalloc(MemoryStack)instead.
-
mallocStack
@Deprecated public static BGFXMemory mallocStack(org.lwjgl.system.MemoryStack stack)
Deprecated.Deprecated for removal in 3.4.0. Usemalloc(MemoryStack)instead.
-
callocStack
@Deprecated public static BGFXMemory callocStack(org.lwjgl.system.MemoryStack stack)
Deprecated.Deprecated for removal in 3.4.0. Usecalloc(MemoryStack)instead.
-
mallocStack
@Deprecated public static BGFXMemory.Buffer mallocStack(int capacity)
Deprecated.Deprecated for removal in 3.4.0. Usemalloc(int, MemoryStack)instead.
-
callocStack
@Deprecated public static BGFXMemory.Buffer callocStack(int capacity)
Deprecated.Deprecated for removal in 3.4.0. Usecalloc(int, MemoryStack)instead.
-
mallocStack
@Deprecated public static BGFXMemory.Buffer mallocStack(int capacity, org.lwjgl.system.MemoryStack stack)
Deprecated.Deprecated for removal in 3.4.0. Usemalloc(int, MemoryStack)instead.
-
callocStack
@Deprecated public static BGFXMemory.Buffer callocStack(int capacity, org.lwjgl.system.MemoryStack stack)
Deprecated.Deprecated for removal in 3.4.0. Usecalloc(int, MemoryStack)instead.
-
malloc
public static BGFXMemory malloc(org.lwjgl.system.MemoryStack stack)
Returns a newBGFXMemoryinstance allocated on the specifiedMemoryStack.- Parameters:
stack- the stack from which to allocate
-
calloc
public static BGFXMemory calloc(org.lwjgl.system.MemoryStack stack)
Returns a newBGFXMemoryinstance allocated on the specifiedMemoryStackand initializes all its bits to zero.- Parameters:
stack- the stack from which to allocate
-
malloc
public static BGFXMemory.Buffer malloc(int capacity, org.lwjgl.system.MemoryStack stack)
Returns a newBGFXMemory.Bufferinstance allocated on the specifiedMemoryStack.- Parameters:
stack- the stack from which to allocatecapacity- the buffer capacity
-
calloc
public static BGFXMemory.Buffer calloc(int capacity, org.lwjgl.system.MemoryStack stack)
Returns a newBGFXMemory.Bufferinstance allocated on the specifiedMemoryStackand 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().
-
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 thesizefield of the specifiedstruct.
-
validate
public static void validate(long struct)
Validates pointer members that should not beNULL.- Parameters:
struct- the struct to validate
-
-