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.NativeResourcePlatform data.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 intALIGNOFThe struct alignment in bytes.static intBACKBUFFER
BACKBUFFERDS
CONTEXT
NDT
NWHThe struct member offsets.static intSIZEOFThe struct size in bytes.
-
Constructor Summary
Constructors Constructor Description BGFXPlatformData(java.nio.ByteBuffer container)Creates aBGFXPlatformDatainstance at the current position of the specifiedByteBuffercontainer.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description longbackBuffer()GL back-buffer, or D3D render target view.BGFXPlatformDatabackBuffer(long value)Sets the specified value to thebackBuffer()field.longbackBufferDS()backbuffer depth/stencil.BGFXPlatformDatabackBufferDS(long value)Sets the specified value to thebackBufferDS()field.static BGFXPlatformDatacalloc()Returns a newBGFXPlatformDatainstance allocated withmemCalloc.static BGFXPlatformDatacalloc(org.lwjgl.system.MemoryStack stack)Returns a newBGFXPlatformDatainstance allocated on the specifiedMemoryStackand initializes all its bits to zero.static BGFXPlatformDatacallocStack()Deprecated.static BGFXPlatformDatacallocStack(org.lwjgl.system.MemoryStack stack)Deprecated.longcontext()GL context, or D3D device.BGFXPlatformDatacontext(long value)Sets the specified value to thecontext()field.static BGFXPlatformDatacreate()Returns a newBGFXPlatformDatainstance allocated withBufferUtils.static BGFXPlatformDatacreate(long address)Returns a newBGFXPlatformDatainstance for the specified memory address.static BGFXPlatformDatacreateSafe(long address)static BGFXPlatformDatamalloc()Returns a newBGFXPlatformDatainstance allocated withmemAlloc.static BGFXPlatformDatamalloc(org.lwjgl.system.MemoryStack stack)Returns a newBGFXPlatformDatainstance allocated on the specifiedMemoryStack.static BGFXPlatformDatamallocStack()Deprecated.static BGFXPlatformDatamallocStack(org.lwjgl.system.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()native display type (*nix specific)BGFXPlatformDatandt(long value)Sets the specified value to thendt()field.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.longnwh()native window handle.BGFXPlatformDatanwh(long value)Sets the specified value to thenwh()field.BGFXPlatformDataset(long ndt, long nwh, long context, long backBuffer, long backBufferDS)Initializes this struct with the specified values.BGFXPlatformDataset(BGFXPlatformData src)Copies the specified struct data to this struct.intsizeof()
-
-
-
Constructor Detail
-
BGFXPlatformData
public BGFXPlatformData(java.nio.ByteBuffer container)
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 Detail
-
sizeof
public int sizeof()
- Specified by:
sizeofin classorg.lwjgl.system.Struct
-
ndt
public long ndt()
native display type (*nix specific)
-
nwh
public long nwh()
native window handle. IfNULLbgfx will create headless context/device if renderer API supports it.
-
context
public long context()
GL context, or D3D device. IfNULL, bgfx will create context/device.
-
backBuffer
public long backBuffer()
GL back-buffer, or D3D render target view. IfNULLbgfx will create back-buffer color surface.
-
backBufferDS
public long backBufferDS()
backbuffer depth/stencil. IfNULLbgfx will create back-buffer depth/stencil surface.
-
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 newBGFXPlatformDatainstance allocated withmemAlloc. The instance must be explicitly freed.
-
calloc
public static BGFXPlatformData calloc()
Returns a newBGFXPlatformDatainstance allocated withmemCalloc. The instance must be explicitly freed.
-
create
public static BGFXPlatformData create()
Returns a newBGFXPlatformDatainstance allocated withBufferUtils.
-
create
public static BGFXPlatformData create(long address)
Returns a newBGFXPlatformDatainstance for the specified memory address.
-
createSafe
@Nullable public static BGFXPlatformData createSafe(long address)
-
mallocStack
@Deprecated public static BGFXPlatformData mallocStack()
Deprecated.Deprecated for removal in 3.4.0. Usemalloc(MemoryStack)instead.
-
callocStack
@Deprecated public static BGFXPlatformData callocStack()
Deprecated.Deprecated for removal in 3.4.0. Usecalloc(MemoryStack)instead.
-
mallocStack
@Deprecated public static BGFXPlatformData mallocStack(org.lwjgl.system.MemoryStack stack)
Deprecated.Deprecated for removal in 3.4.0. Usemalloc(MemoryStack)instead.
-
callocStack
@Deprecated public static BGFXPlatformData callocStack(org.lwjgl.system.MemoryStack stack)
Deprecated.Deprecated for removal in 3.4.0. Usecalloc(MemoryStack)instead.
-
malloc
public static BGFXPlatformData malloc(org.lwjgl.system.MemoryStack stack)
Returns a newBGFXPlatformDatainstance allocated on the specifiedMemoryStack.- Parameters:
stack- the stack from which to allocate
-
calloc
public static BGFXPlatformData calloc(org.lwjgl.system.MemoryStack stack)
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().
-
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.
-
-