Package org.lwjgl.bgfx
Class BGFXPlatformData
- java.lang.Object
-
- org.lwjgl.system.Pointer.Default
-
- org.lwjgl.system.Struct
-
- org.lwjgl.bgfx.BGFXPlatformData
-
- All Implemented Interfaces:
java.lang.AutoCloseable
,org.lwjgl.system.NativeResource
,org.lwjgl.system.Pointer
public class BGFXPlatformData extends org.lwjgl.system.Struct implements org.lwjgl.system.NativeResource
Platform data.Member documentation
ndt
– native display typenwh
– native window handlecontext
– GL context, or D3D devicebackBuffer
– GL backbuffer, or D3D render target viewbackBufferDS
– Backbuffer depth/stencil
Layout
struct bgfx_platform_data_t { void * ndt; void * nwh; void * context; void * backBuffer; void * backBufferDS; }
-
-
Field Summary
Fields Modifier and Type Field Description static int
ALIGNOF
The struct alignment in bytes.static int
BACKBUFFER
BACKBUFFERDS
CONTEXT
NDT
NWHThe struct member offsets.static int
SIZEOF
The struct size in bytes.
-
Constructor Summary
Constructors Constructor Description BGFXPlatformData(java.nio.ByteBuffer container)
Creates aBGFXPlatformData
instance at the current position of the specifiedByteBuffer
container.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description long
backBuffer()
Returns the value of thebackBuffer
field.BGFXPlatformData
backBuffer(long value)
Sets the specified value to thebackBuffer
field.long
backBufferDS()
Returns the value of thebackBufferDS
field.BGFXPlatformData
backBufferDS(long value)
Sets the specified value to thebackBufferDS
field.static BGFXPlatformData
calloc()
Returns a newBGFXPlatformData
instance allocated withmemCalloc
.static BGFXPlatformData
callocStack()
Returns a newBGFXPlatformData
instance allocated on the thread-localMemoryStack
and initializes all its bits to zero.static BGFXPlatformData
callocStack(org.lwjgl.system.MemoryStack stack)
Returns a newBGFXPlatformData
instance allocated on the specifiedMemoryStack
and initializes all its bits to zero.long
context()
Returns the value of thecontext
field.BGFXPlatformData
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 BGFXPlatformData
createSafe(long address)
static BGFXPlatformData
malloc()
Returns a newBGFXPlatformData
instance allocated withmemAlloc
.static BGFXPlatformData
mallocStack()
Returns a newBGFXPlatformData
instance allocated on the thread-localMemoryStack
.static BGFXPlatformData
mallocStack(org.lwjgl.system.MemoryStack stack)
Returns a newBGFXPlatformData
instance allocated on the specifiedMemoryStack
.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()
Returns the value of thendt
field.BGFXPlatformData
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
.long
nwh()
Returns the value of thenwh
field.BGFXPlatformData
nwh(long value)
Sets the specified value to thenwh
field.BGFXPlatformData
set(long ndt, long nwh, long context, long backBuffer, long backBufferDS)
Initializes this struct with the specified values.BGFXPlatformData
set(BGFXPlatformData src)
Copies the specified struct data to this struct.int
sizeof()
-
-
-
Constructor Detail
-
BGFXPlatformData
public BGFXPlatformData(java.nio.ByteBuffer container)
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 Detail
-
sizeof
public int sizeof()
- Specified by:
sizeof
in classorg.lwjgl.system.Struct
-
ndt
public long ndt()
Returns the value of thendt
field.
-
nwh
public long nwh()
Returns the value of thenwh
field.
-
context
public long context()
Returns the value of thecontext
field.
-
backBuffer
public long backBuffer()
Returns the value of thebackBuffer
field.
-
backBufferDS
public long backBufferDS()
Returns the value of thebackBufferDS
field.
-
ndt
public BGFXPlatformData ndt(long value)
Sets the specified value to thendt
field.
-
nwh
public BGFXPlatformData nwh(long value)
Sets the specified value to thenwh
field.
-
context
public BGFXPlatformData context(long value)
Sets the specified value to thecontext
field.
-
backBuffer
public BGFXPlatformData backBuffer(long value)
Sets the specified value to thebackBuffer
field.
-
backBufferDS
public BGFXPlatformData backBufferDS(long value)
Sets the specified value to thebackBufferDS
field.
-
set
public BGFXPlatformData set(long ndt, long nwh, long context, long backBuffer, long backBufferDS)
Initializes this struct with the specified values.
-
set
public BGFXPlatformData set(BGFXPlatformData src)
Copies the specified struct data to this struct.- Parameters:
src
- the source struct- Returns:
- this struct
-
malloc
public static BGFXPlatformData malloc()
Returns a newBGFXPlatformData
instance allocated withmemAlloc
. The instance must be explicitly freed.
-
calloc
public static BGFXPlatformData calloc()
Returns a newBGFXPlatformData
instance allocated withmemCalloc
. The instance must be explicitly freed.
-
create
public static BGFXPlatformData create()
Returns a newBGFXPlatformData
instance allocated withBufferUtils
.
-
create
public static BGFXPlatformData create(long address)
Returns a newBGFXPlatformData
instance for the specified memory address.
-
createSafe
@Nullable public static BGFXPlatformData createSafe(long address)
-
mallocStack
public static BGFXPlatformData mallocStack()
Returns a newBGFXPlatformData
instance allocated on the thread-localMemoryStack
.
-
callocStack
public static BGFXPlatformData callocStack()
Returns a newBGFXPlatformData
instance allocated on the thread-localMemoryStack
and initializes all its bits to zero.
-
mallocStack
public static BGFXPlatformData mallocStack(org.lwjgl.system.MemoryStack stack)
Returns a newBGFXPlatformData
instance allocated on the specifiedMemoryStack
.- Parameters:
stack
- the stack from which to allocate
-
callocStack
public static BGFXPlatformData callocStack(org.lwjgl.system.MemoryStack stack)
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()
.
-
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
.
-
-