Package org.lwjgl.bgfx
Class BGFXPlatformData
- All Implemented Interfaces:
AutoCloseable,NativeResource,Pointer
struct bgfx_platform_data_t {
void * ndt;
void * nwh;
void * context;
void * backBuffer;
void * backBufferDS;
bgfx_native_window_handle_type_t type;
}-
Nested Class Summary
Nested classes/interfaces inherited from class org.lwjgl.system.Struct
Struct.StructValidationNested classes/interfaces inherited from interface org.lwjgl.system.Pointer
Pointer.Default -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final intThe struct alignment in bytes.static final intThe struct member offsets.static final intThe struct member offsets.static final intThe struct member offsets.static final intThe struct member offsets.static final intThe struct member offsets.static final intThe struct size in bytes.static final intThe struct member offsets.Fields inherited from interface org.lwjgl.system.Pointer
BITS32, BITS64, CLONG_SHIFT, CLONG_SIZE, POINTER_SHIFT, POINTER_SIZE -
Constructor Summary
ConstructorsConstructorDescriptionBGFXPlatformData(ByteBuffer container) Creates aBGFXPlatformDatainstance at the current position of the specifiedByteBuffercontainer. -
Method Summary
Modifier and TypeMethodDescriptionlongbackBuffer(long value) Sets the specified value to thebackBufferfield.longbackBufferDS(long value) Sets the specified value to thebackBufferDSfield.static BGFXPlatformDatacalloc()Returns a newBGFXPlatformDatainstance allocated withmemCalloc.static BGFXPlatformDatacalloc(MemoryStack stack) Returns a newBGFXPlatformDatainstance allocated on the specifiedMemoryStackand initializes all its bits to zero.static BGFXPlatformDataDeprecated.static BGFXPlatformDatacallocStack(MemoryStack stack) Deprecated.longcontext()context(long value) Sets the specified value to thecontextfield.static BGFXPlatformDatacreate()Returns a newBGFXPlatformDatainstance allocated withBufferUtils.static BGFXPlatformDatacreate(long address) Returns a newBGFXPlatformDatainstance for the specified memory address.static @Nullable BGFXPlatformDatacreateSafe(long address) static BGFXPlatformDatamalloc()Returns a newBGFXPlatformDatainstance allocated withmemAlloc.static BGFXPlatformDatamalloc(MemoryStack stack) Returns a newBGFXPlatformDatainstance allocated on the specifiedMemoryStack.static BGFXPlatformDataDeprecated.static BGFXPlatformDatamallocStack(MemoryStack stack) Deprecated.static longnbackBuffer(long struct) Unsafe version ofbackBuffer().static voidnbackBuffer(long struct, long value) Unsafe version ofbackBuffer.static longnbackBufferDS(long struct) Unsafe version ofbackBufferDS().static voidnbackBufferDS(long struct, long value) Unsafe version ofbackBufferDS.static longncontext(long struct) Unsafe version ofcontext().static voidncontext(long struct, long value) Unsafe version ofcontext.longndt()ndt(long value) Sets the specified value to thendtfield.static longnndt(long struct) Unsafe version ofndt().static voidnndt(long struct, long value) Unsafe version ofndt.static longnnwh(long struct) Unsafe version ofnwh().static voidnnwh(long struct, long value) Unsafe version ofnwh.static intntype(long struct) Unsafe version oftype().static voidntype(long struct, int value) Unsafe version oftype.longnwh()nwh(long value) Sets the specified value to thenwhfield.set(long ndt, long nwh, long context, long backBuffer, long backBufferDS, int type) Initializes this struct with the specified values.set(BGFXPlatformData src) Copies the specified struct data to this struct.intsizeof()Returnssizeof(struct).inttype()type(int value) Sets the specified value to thetypefield.Methods inherited from class org.lwjgl.system.Pointer.Default
address, equals, hashCode, toStringMethods inherited from interface org.lwjgl.system.NativeResource
close, free
-
Field Details
-
SIZEOF
public static final int SIZEOFThe struct size in bytes. -
ALIGNOF
public static final int ALIGNOFThe struct alignment in bytes. -
NDT
public static final int NDTThe struct member offsets. -
NWH
public static final int NWHThe struct member offsets. -
CONTEXT
public static final int CONTEXTThe struct member offsets. -
BACKBUFFER
public static final int BACKBUFFERThe struct member offsets. -
BACKBUFFERDS
public static final int BACKBUFFERDSThe struct member offsets. -
TYPE
public static final int TYPEThe struct member offsets.
-
-
Constructor Details
-
BGFXPlatformData
Creates aBGFXPlatformDatainstance 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 Details
-
sizeof
public int sizeof()Description copied from class:StructReturnssizeof(struct).- Specified by:
sizeofin classStruct<BGFXPlatformData>
-
ndt
public long ndt()- Returns:
- the value of the
ndtfield.
-
nwh
public long nwh()- Returns:
- the value of the
nwhfield.
-
context
public long context()- Returns:
- the value of the
contextfield.
-
backBuffer
public long backBuffer()- Returns:
- the value of the
backBufferfield.
-
backBufferDS
public long backBufferDS()- Returns:
- the value of the
backBufferDSfield.
-
type
public int type()- Returns:
- the value of the
typefield.
-
ndt
Sets the specified value to thendtfield. -
nwh
Sets the specified value to thenwhfield. -
context
Sets the specified value to thecontextfield. -
backBuffer
Sets the specified value to thebackBufferfield. -
backBufferDS
Sets the specified value to thebackBufferDSfield. -
type
Sets the specified value to thetypefield. -
set
public BGFXPlatformData set(long ndt, long nwh, long context, long backBuffer, long backBufferDS, int type) Initializes this struct with the specified values. -
set
Copies the specified struct data to this struct.- Parameters:
src- the source struct- Returns:
- this struct
-
malloc
Returns a newBGFXPlatformDatainstance allocated withmemAlloc. The instance must be explicitly freed. -
calloc
Returns a newBGFXPlatformDatainstance allocated withmemCalloc. The instance must be explicitly freed. -
create
Returns a newBGFXPlatformDatainstance allocated withBufferUtils. -
create
Returns a newBGFXPlatformDatainstance for the specified memory address. -
createSafe
-
mallocStack
Deprecated.Deprecated for removal in 3.4.0. Usemalloc(MemoryStack)instead. -
callocStack
Deprecated.Deprecated for removal in 3.4.0. Usecalloc(MemoryStack)instead. -
mallocStack
Deprecated.Deprecated for removal in 3.4.0. Usemalloc(MemoryStack)instead. -
callocStack
Deprecated.Deprecated for removal in 3.4.0. Usecalloc(MemoryStack)instead. -
malloc
Returns a newBGFXPlatformDatainstance allocated on the specifiedMemoryStack.- Parameters:
stack- the stack from which to allocate
-
calloc
Returns a newBGFXPlatformDatainstance allocated on the specifiedMemoryStackand initializes all its bits to zero.- Parameters:
stack- the stack from which to allocate
-
nndt
public static long nndt(long struct) Unsafe version ofndt(). -
nnwh
public static long nnwh(long struct) Unsafe version ofnwh(). -
ncontext
public static long ncontext(long struct) Unsafe version ofcontext(). -
nbackBuffer
public static long nbackBuffer(long struct) Unsafe version ofbackBuffer(). -
nbackBufferDS
public static long nbackBufferDS(long struct) Unsafe version ofbackBufferDS(). -
ntype
public static int ntype(long struct) Unsafe version oftype(). -
nndt
public static void nndt(long struct, long value) Unsafe version ofndt. -
nnwh
public static void nnwh(long struct, long value) Unsafe version ofnwh. -
ncontext
public static void ncontext(long struct, long value) Unsafe version ofcontext. -
nbackBuffer
public static void nbackBuffer(long struct, long value) Unsafe version ofbackBuffer. -
nbackBufferDS
public static void nbackBufferDS(long struct, long value) Unsafe version ofbackBufferDS. -
ntype
public static void ntype(long struct, int value) Unsafe version oftype.
-