Top Description Fields Constructors Methods
org.lwjgl.bgfx

public Class BGFXPlatformData

extends Struct<BGFXPlatformData>
implements NativeResource
Class Inheritance
All Implemented Interfaces
org.lwjgl.system.NativeResource, java.lang.AutoCloseable
Annotations
@NativeType:struct bgfx_platform_data_t
Imports
javax.annotation.*, java.nio.*, org.lwjgl.*, org.lwjgl.system.*

Platform data.

Layout


struct bgfx_platform_data_t {
    void * ndt;
    void * nwh;
    void * context;
    void * backBuffer;
    void * backBufferDS;
    bgfx_native_window_handle_type_t type;
}

Field Summary

Modifier and TypeField and Description
public static final int
ALIGNOF

The struct alignment in bytes.

public static final int
BACKBUFFER

The struct member offsets.

public static final int
BACKBUFFERDS

The struct member offsets.

public static final int
CONTEXT

The struct member offsets.

public static final int
NDT

The struct member offsets.

public static final int
NWH

The struct member offsets.

public static final int
SIZEOF

The struct size in bytes.

public static final int
TYPE

The struct member offsets.

Inherited from org.lwjgl.system.Struct:
containerDEFAULT_ALIGN_ASDEFAULT_PACK_ALIGNMENT

Constructor Summary

AccessConstructor and Description
protected
BGFXPlatformData(long address, ByteBuffer container)

public
BGFXPlatformData(ByteBuffer container)

Creates a BGFXPlatformData instance at the current position of the specified ByteBuffer container.

Method Summary

Modifier and TypeMethod and Description
public long
backBuffer()

GL back-buffer, or D3D render target view.

public BGFXPlatformData
backBuffer(long value)

Sets the specified value to the backBuffer field.

public long
backBufferDS()

backbuffer depth/stencil.

public BGFXPlatformData
backBufferDS(long value)

Sets the specified value to the backBufferDS field.

public static BGFXPlatformData
calloc()

Returns a new BGFXPlatformData instance allocated with memCalloc.

public static BGFXPlatformData
calloc(MemoryStack
the stack from which to allocate
stack
)

Returns a new BGFXPlatformData instance allocated on the specified MemoryStack and initializes all its bits to zero.

public static BGFXPlatformData
callocStack()

Deprecated
Deprecated for removal in 3.4.0.
public static BGFXPlatformData
callocStack(MemoryStack stack)

Deprecated
Deprecated for removal in 3.4.0.
public long
context()

GL context, D3D device, or Vulkan device.

public BGFXPlatformData
context(long value)

Sets the specified value to the context field.

protected BGFXPlatformData
create(long
the struct memory address
address
,
ByteBuffer
an optional container buffer, to be referenced strongly by the struct instance.
container
)

Implements abstract org.lwjgl.system.Struct.create.

Similar to the constructor, but returns the exact type of the Struct subclass.
public static BGFXPlatformData
create()

Returns a new BGFXPlatformData instance allocated with BufferUtils.

public static BGFXPlatformData
create(long address)

Returns a new BGFXPlatformData instance for the specified memory address.

public static BGFXPlatformData
createSafe(long address)

Like create, but returns null if address is NULL.

public static BGFXPlatformData
malloc()

Returns a new BGFXPlatformData instance allocated with memAlloc.

public static BGFXPlatformData
malloc(MemoryStack
the stack from which to allocate
stack
)

Returns a new BGFXPlatformData instance allocated on the specified MemoryStack.

public static BGFXPlatformData
mallocStack()

Deprecated
Deprecated for removal in 3.4.0.
public static BGFXPlatformData
mallocStack(MemoryStack stack)

Deprecated
Deprecated for removal in 3.4.0.
public static long
nbackBuffer(long struct)

Unsafe version of backBuffer.

public static void
nbackBuffer(long struct, long value)

Unsafe version of backBuffer.

public static long
nbackBufferDS(long struct)

Unsafe version of backBufferDS.

public static void
nbackBufferDS(long struct, long value)

Unsafe version of backBufferDS.

public static long
ncontext(long struct)

Unsafe version of context.

public static void
ncontext(long struct, long value)

Unsafe version of context.

public long
ndt()

native display type (*nix specific)

public BGFXPlatformData
ndt(long value)

Sets the specified value to the ndt field.

public static long
nndt(long struct)

Unsafe version of ndt.

public static void
nndt(long struct, long value)

Unsafe version of ndt.

public static long
nnwh(long struct)

Unsafe version of nwh.

public static void
nnwh(long struct, long value)

Unsafe version of nwh.

public static int
ntype(long struct)

Unsafe version of type.

public static void
ntype(long struct, int value)

Unsafe version of type.

public long
nwh()

native window handle.

public BGFXPlatformData
nwh(long value)

Sets the specified value to the nwh field.

public BGFXPlatformData
set(long ndt, long nwh, long context, long backBuffer, long backBufferDS, int type)

Initializes this struct with the specified values.

public BGFXPlatformData

Returns:

this struct
set
(BGFXPlatformData
the source struct
src
)

Copies the specified struct data to this struct.

public int
sizeof()

Implements abstract org.lwjgl.system.Struct.sizeof.

Returns sizeof(struct).
public int
type()

handle type.

public BGFXPlatformData
type(int value)

Sets the specified value to the type field.

Inherited from org.lwjgl.system.Struct:
__array__array__array__checkContainer__checkMalloc__create__getContainer__getContainer__member__member__member__padding__padding__struct__struct__union__unionclearfreeisNullvalidate

Field Detail

ALIGNOFback to summary
public static final int ALIGNOF

The struct alignment in bytes.

BACKBUFFERback to summary
public static final int BACKBUFFER

The struct member offsets.

BACKBUFFERDSback to summary
public static final int BACKBUFFERDS

The struct member offsets.

CONTEXTback to summary
public static final int CONTEXT

The struct member offsets.

NDTback to summary
public static final int NDT

The struct member offsets.

NWHback to summary
public static final int NWH

The struct member offsets.

SIZEOFback to summary
public static final int SIZEOF

The struct size in bytes.

TYPEback to summary
public static final int TYPE

The struct member offsets.

Constructor Detail

BGFXPlatformDataback to summary
protected BGFXPlatformData(long address, ByteBuffer container)
BGFXPlatformDataback to summary
public BGFXPlatformData(ByteBuffer container)

Creates a BGFXPlatformData instance at the current position of the specified ByteBuffer 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

backBufferback to summary
public long backBuffer()

GL back-buffer, or D3D render target view. If NULL bgfx will create back-buffer color surface.

Annotations
@NativeType:void *
backBufferback to summary
public BGFXPlatformData backBuffer(long value)

Sets the specified value to the backBuffer field.

backBufferDSback to summary
public long backBufferDS()

backbuffer depth/stencil. If NULL, bgfx will create a back-buffer depth/stencil surface.

Annotations
@NativeType:void *
backBufferDSback to summary
public BGFXPlatformData backBufferDS(long value)

Sets the specified value to the backBufferDS field.

callocback to summary
public static BGFXPlatformData calloc()

Returns a new BGFXPlatformData instance allocated with memCalloc. The instance must be explicitly freed.

callocback to summary
public static BGFXPlatformData calloc(MemoryStack stack)

Returns a new BGFXPlatformData instance allocated on the specified MemoryStack and initializes all its bits to zero.

Parameters
stack:MemoryStack

the stack from which to allocate

callocStackback to summary
public static BGFXPlatformData callocStack()

Deprecated

Deprecated for removal in 3.4.0. Use calloc(MemoryStack) instead.

Annotations
@Deprecated
callocStackback to summary
public static BGFXPlatformData callocStack(MemoryStack stack)

Deprecated

Deprecated for removal in 3.4.0. Use calloc(MemoryStack) instead.

Annotations
@Deprecated
contextback to summary
public long context()

GL context, D3D device, or Vulkan device. If NULL, bgfx will create context/device.

Annotations
@NativeType:void *
contextback to summary
public BGFXPlatformData context(long value)

Sets the specified value to the context field.

createback to summary
protected BGFXPlatformData create(long address, ByteBuffer container)

Implements abstract org.lwjgl.system.Struct.create.

Doc from org.lwjgl.system.Struct.create.

Similar to the constructor, but returns the exact type of the Struct subclass.

Effectively, every Struct instance is a factory for more instances of the same type. This is used by StructBuffer.

Parameters
address:long

the struct memory address

container:ByteBuffer

an optional container buffer, to be referenced strongly by the struct instance.

Annotations
@Override
createback to summary
public static BGFXPlatformData create()

Returns a new BGFXPlatformData instance allocated with BufferUtils.

createback to summary
public static BGFXPlatformData create(long address)

Returns a new BGFXPlatformData instance for the specified memory address.

createSafeback to summary
public static BGFXPlatformData createSafe(long address)

Like create, but returns null if address is NULL.

Annotations
@Nullable
mallocback to summary
public static BGFXPlatformData malloc()

Returns a new BGFXPlatformData instance allocated with memAlloc. The instance must be explicitly freed.

mallocback to summary
public static BGFXPlatformData malloc(MemoryStack stack)

Returns a new BGFXPlatformData instance allocated on the specified MemoryStack.

Parameters
stack:MemoryStack

the stack from which to allocate

mallocStackback to summary
public static BGFXPlatformData mallocStack()

Deprecated

Deprecated for removal in 3.4.0. Use malloc(MemoryStack) instead.

Annotations
@Deprecated
mallocStackback to summary
public static BGFXPlatformData mallocStack(MemoryStack stack)

Deprecated

Deprecated for removal in 3.4.0. Use malloc(MemoryStack) instead.

Annotations
@Deprecated
nbackBufferback to summary
public static long nbackBuffer(long struct)

Unsafe version of backBuffer.

nbackBufferback to summary
public static void nbackBuffer(long struct, long value)

Unsafe version of backBuffer.

nbackBufferDSback to summary
public static long nbackBufferDS(long struct)

Unsafe version of backBufferDS.

nbackBufferDSback to summary
public static void nbackBufferDS(long struct, long value)

Unsafe version of backBufferDS.

ncontextback to summary
public static long ncontext(long struct)

Unsafe version of context.

ncontextback to summary
public static void ncontext(long struct, long value)

Unsafe version of context.

ndtback to summary
public long ndt()

native display type (*nix specific)

Annotations
@NativeType:void *
ndtback to summary
public BGFXPlatformData ndt(long value)

Sets the specified value to the ndt field.

nndtback to summary
public static long nndt(long struct)

Unsafe version of ndt.

nndtback to summary
public static void nndt(long struct, long value)

Unsafe version of ndt.

nnwhback to summary
public static long nnwh(long struct)

Unsafe version of nwh.

nnwhback to summary
public static void nnwh(long struct, long value)

Unsafe version of nwh.

ntypeback to summary
public static int ntype(long struct)

Unsafe version of type.

ntypeback to summary
public static void ntype(long struct, int value)

Unsafe version of type.

nwhback to summary
public long nwh()

native window handle. If NULL, bgfx will create a headless context/device, provided the rendering API supports it.

Annotations
@NativeType:void *
nwhback to summary
public BGFXPlatformData nwh(long value)

Sets the specified value to the nwh field.

setback to summary
public BGFXPlatformData set(long ndt, long nwh, long context, long backBuffer, long backBufferDS, int type)

Initializes this struct with the specified values.

setback to summary
public BGFXPlatformData set(BGFXPlatformData src)

Copies the specified struct data to this struct.

Parameters
src:BGFXPlatformData

the source struct

Returns:BGFXPlatformData

this struct

sizeofback to summary
public int sizeof()

Implements abstract org.lwjgl.system.Struct.sizeof.

Doc from org.lwjgl.system.Struct.sizeof.

Returns sizeof(struct).

Annotations
@Override
typeback to summary
public int type()

handle type. Needed for platforms having more than one option.

Annotations
@NativeType:bgfx_native_window_handle_type_t
typeback to summary
public BGFXPlatformData type(int value)

Sets the specified value to the type field.