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.StructValidation
Nested classes/interfaces inherited from interface org.lwjgl.system.Pointer
Pointer.Default
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final int
The struct alignment in bytes.static final int
The struct member offsets.static final int
The struct member offsets.static final int
The struct member offsets.static final int
The struct member offsets.static final int
The struct member offsets.static final int
The struct size in bytes.static final int
The 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 aBGFXPlatformData
instance at the current position of the specifiedByteBuffer
container. -
Method Summary
Modifier and TypeMethodDescriptionlong
backBuffer
(long value) Sets the specified value to thebackBuffer
field.long
backBufferDS
(long value) Sets the specified value to thebackBufferDS
field.static BGFXPlatformData
calloc()
Returns a newBGFXPlatformData
instance allocated withmemCalloc
.static BGFXPlatformData
calloc
(MemoryStack stack) Returns a newBGFXPlatformData
instance allocated on the specifiedMemoryStack
and initializes all its bits to zero.static BGFXPlatformData
Deprecated.static BGFXPlatformData
callocStack
(MemoryStack stack) Deprecated.long
context()
context
(long value) Sets the specified value to thecontext
field.static BGFXPlatformData
create()
Returns a newBGFXPlatformData
instance allocated withBufferUtils
.static BGFXPlatformData
create
(long address) Returns a newBGFXPlatformData
instance for the specified memory address.static @Nullable BGFXPlatformData
createSafe
(long address) static BGFXPlatformData
malloc()
Returns a newBGFXPlatformData
instance allocated withmemAlloc
.static BGFXPlatformData
malloc
(MemoryStack stack) Returns a newBGFXPlatformData
instance allocated on the specifiedMemoryStack
.static BGFXPlatformData
Deprecated.static BGFXPlatformData
mallocStack
(MemoryStack stack) Deprecated.static long
nbackBuffer
(long struct) Unsafe version ofbackBuffer()
.static void
nbackBuffer
(long struct, long value) Unsafe version ofbackBuffer
.static long
nbackBufferDS
(long struct) Unsafe version ofbackBufferDS()
.static void
nbackBufferDS
(long struct, long value) Unsafe version ofbackBufferDS
.static long
ncontext
(long struct) Unsafe version ofcontext()
.static void
ncontext
(long struct, long value) Unsafe version ofcontext
.long
ndt()
ndt
(long value) Sets the specified value to thendt
field.static long
nndt
(long struct) Unsafe version ofndt()
.static void
nndt
(long struct, long value) Unsafe version ofndt
.static long
nnwh
(long struct) Unsafe version ofnwh()
.static void
nnwh
(long struct, long value) Unsafe version ofnwh
.static int
ntype
(long struct) Unsafe version oftype()
.static void
ntype
(long struct, int value) Unsafe version oftype
.long
nwh()
nwh
(long value) Sets the specified value to thenwh
field.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.int
sizeof()
Returnssizeof(struct)
.int
type()
type
(int value) Sets the specified value to thetype
field.Methods inherited from class org.lwjgl.system.Pointer.Default
address, equals, hashCode, toString
Methods 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 aBGFXPlatformData
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 Details
-
sizeof
public int sizeof()Description copied from class:Struct
Returnssizeof(struct)
.- Specified by:
sizeof
in classStruct<BGFXPlatformData>
-
ndt
public long ndt()- Returns:
- the value of the
ndt
field.
-
nwh
public long nwh()- Returns:
- the value of the
nwh
field.
-
context
public long context()- Returns:
- the value of the
context
field.
-
backBuffer
public long backBuffer()- Returns:
- the value of the
backBuffer
field.
-
backBufferDS
public long backBufferDS()- Returns:
- the value of the
backBufferDS
field.
-
type
public int type()- Returns:
- the value of the
type
field.
-
ndt
Sets the specified value to thendt
field. -
nwh
Sets the specified value to thenwh
field. -
context
Sets the specified value to thecontext
field. -
backBuffer
Sets the specified value to thebackBuffer
field. -
backBufferDS
Sets the specified value to thebackBufferDS
field. -
type
Sets the specified value to thetype
field. -
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 newBGFXPlatformData
instance allocated withmemAlloc
. The instance must be explicitly freed. -
calloc
Returns a newBGFXPlatformData
instance allocated withmemCalloc
. The instance must be explicitly freed. -
create
Returns a newBGFXPlatformData
instance allocated withBufferUtils
. -
create
Returns a newBGFXPlatformData
instance 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 newBGFXPlatformData
instance allocated on the specifiedMemoryStack
.- Parameters:
stack
- the stack from which to allocate
-
calloc
Returns a newBGFXPlatformData
instance allocated on the specifiedMemoryStack
and 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
.
-