Top Description Inners Fields Constructors Methods
org.lwjgl.bgfx

public Class BGFXAttachment

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

Frame buffer texture attachment info.

Layout


struct bgfx_attachment_t {
    bgfx_access_t access;
    bgfx_texture_handle_t handle;
    uint16_t mip;
    uint16_t layer;
    uint16_t numLayers;
    uint8_t resolve;
}

Nested and Inner Type Summary

Modifier and TypeClass and Description
public static class

Field Summary

Modifier and TypeField and Description
public static final int
ACCESS

The struct member offsets.

public static final int
ALIGNOF

The struct alignment in bytes.

public static final int
HANDLE

The struct member offsets.

public static final int
LAYER

The struct member offsets.

public static final int
MIP

The struct member offsets.

public static final int
NUMLAYERS

The struct member offsets.

public static final int
RESOLVE

The struct member offsets.

public static final int
SIZEOF

The struct size in bytes.

Inherited from org.lwjgl.system.Struct:
containerDEFAULT_ALIGN_ASDEFAULT_PACK_ALIGNMENT

Constructor Summary

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

public
BGFXAttachment(ByteBuffer container)

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

Method Summary

Modifier and TypeMethod and Description
public int
access()

attachment access

public BGFXAttachment
access(int value)

Sets the specified value to the access field.

public static BGFXAttachment
calloc()

Returns a new BGFXAttachment instance allocated with memCalloc.

public static BGFXAttachment.Buffer
calloc(int
the buffer capacity
capacity
)

Returns a new BGFXAttachment.Buffer instance allocated with memCalloc.

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

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

public static BGFXAttachment.Buffer
calloc(int
the buffer capacity
capacity
,
MemoryStack
the stack from which to allocate
stack
)

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

public static BGFXAttachment
callocStack()

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

Deprecated
Deprecated for removal in 3.4.0.
public static BGFXAttachment.Buffer
callocStack(int capacity)

Deprecated
Deprecated for removal in 3.4.0.
public static BGFXAttachment.Buffer
callocStack(int capacity, MemoryStack stack)

Deprecated
Deprecated for removal in 3.4.0.
protected BGFXAttachment
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 BGFXAttachment
create()

Returns a new BGFXAttachment instance allocated with BufferUtils.

public static BGFXAttachment
create(long address)

Returns a new BGFXAttachment instance for the specified memory address.

public static BGFXAttachment.Buffer
create(int
the buffer capacity
capacity
)

Returns a new BGFXAttachment.Buffer instance allocated with BufferUtils.

public static BGFXAttachment.Buffer
create(long
the memory address
address
,
int
the buffer capacity
capacity
)

Create a BGFXAttachment.Buffer instance at the specified memory.

public static BGFXAttachment
createSafe(long address)

Like create, but returns null if address is NULL.

public static BGFXAttachment.Buffer
createSafe(long address, int capacity)

Like create, but returns null if address is NULL.

public short
handle()

render target texture handle

public BGFXAttachment
handle(short value)

Sets the specified value to the handle field.

public short
layer()

cubemap side or depth layer/slice to use

public BGFXAttachment
layer(short value)

Sets the specified value to the layer field.

public static BGFXAttachment
malloc()

Returns a new BGFXAttachment instance allocated with memAlloc.

public static BGFXAttachment.Buffer
malloc(int
the buffer capacity
capacity
)

Returns a new BGFXAttachment.Buffer instance allocated with memAlloc.

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

Returns a new BGFXAttachment instance allocated on the specified MemoryStack.

public static BGFXAttachment.Buffer
malloc(int
the buffer capacity
capacity
,
MemoryStack
the stack from which to allocate
stack
)

Returns a new BGFXAttachment.Buffer instance allocated on the specified MemoryStack.

public static BGFXAttachment
mallocStack()

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

Deprecated
Deprecated for removal in 3.4.0.
public static BGFXAttachment.Buffer
mallocStack(int capacity)

Deprecated
Deprecated for removal in 3.4.0.
public static BGFXAttachment.Buffer
mallocStack(int capacity, MemoryStack stack)

Deprecated
Deprecated for removal in 3.4.0.
public short
mip()

mip level

public BGFXAttachment
mip(short value)

Sets the specified value to the mip field.

public static int
naccess(long struct)

Unsafe version of access.

public static void
naccess(long struct, int value)

Unsafe version of access.

public static short
nhandle(long struct)

Unsafe version of handle.

public static void
nhandle(long struct, short value)

Unsafe version of handle.

public static short
nlayer(long struct)

Unsafe version of layer.

public static void
nlayer(long struct, short value)

Unsafe version of layer.

public static short
nmip(long struct)

Unsafe version of mip.

public static void
nmip(long struct, short value)

Unsafe version of mip.

public static short
nnumLayers(long struct)

Unsafe version of numLayers.

public static void
nnumLayers(long struct, short value)

Unsafe version of numLayers.

public static byte
nresolve(long struct)

Unsafe version of resolve.

public static void
nresolve(long struct, byte value)

Unsafe version of resolve.

public short
numLayers()

number of texture layer/slice(s) in array to use

public BGFXAttachment
numLayers(short value)

Sets the specified value to the numLayers field.

public byte
resolve()

resolve flags.

public BGFXAttachment
resolve(byte value)

Sets the specified value to the resolve field.

public BGFXAttachment
set(int access, short handle, short mip, short layer, short numLayers, byte resolve)

Initializes this struct with the specified values.

public BGFXAttachment

Returns:

this struct
set
(BGFXAttachment
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).
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

ACCESSback to summary
public static final int ACCESS

The struct member offsets.

ALIGNOFback to summary
public static final int ALIGNOF

The struct alignment in bytes.

HANDLEback to summary
public static final int HANDLE

The struct member offsets.

LAYERback to summary
public static final int LAYER

The struct member offsets.

MIPback to summary
public static final int MIP

The struct member offsets.

NUMLAYERSback to summary
public static final int NUMLAYERS

The struct member offsets.

RESOLVEback to summary
public static final int RESOLVE

The struct member offsets.

SIZEOFback to summary
public static final int SIZEOF

The struct size in bytes.

Constructor Detail

BGFXAttachmentback to summary
protected BGFXAttachment(long address, ByteBuffer container)
BGFXAttachmentback to summary
public BGFXAttachment(ByteBuffer container)

Creates a BGFXAttachment 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

accessback to summary
public int access()

attachment access

Annotations
@NativeType:bgfx_access_t
accessback to summary
public BGFXAttachment access(int value)

Sets the specified value to the access field.

callocback to summary
public static BGFXAttachment calloc()

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

callocback to summary
public static BGFXAttachment.Buffer calloc(int capacity)

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

Parameters
capacity:int

the buffer capacity

callocback to summary
public static BGFXAttachment calloc(MemoryStack stack)

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

Parameters
stack:MemoryStack

the stack from which to allocate

callocback to summary
public static BGFXAttachment.Buffer calloc(int capacity, MemoryStack stack)

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

Parameters
capacity:int

the buffer capacity

stack:MemoryStack

the stack from which to allocate

callocStackback to summary
public static BGFXAttachment callocStack()

Deprecated

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

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

Deprecated

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

Annotations
@Deprecated
callocStackback to summary
public static BGFXAttachment.Buffer callocStack(int capacity)

Deprecated

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

Annotations
@Deprecated
callocStackback to summary
public static BGFXAttachment.Buffer callocStack(int capacity, MemoryStack stack)

Deprecated

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

Annotations
@Deprecated
createback to summary
protected BGFXAttachment 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 BGFXAttachment create()

Returns a new BGFXAttachment instance allocated with BufferUtils.

createback to summary
public static BGFXAttachment create(long address)

Returns a new BGFXAttachment instance for the specified memory address.

createback to summary
public static BGFXAttachment.Buffer create(int capacity)

Returns a new BGFXAttachment.Buffer instance allocated with BufferUtils.

Parameters
capacity:int

the buffer capacity

createback to summary
public static BGFXAttachment.Buffer create(long address, int capacity)

Create a BGFXAttachment.Buffer instance at the specified memory.

Parameters
address:long

the memory address

capacity:int

the buffer capacity

createSafeback to summary
public static BGFXAttachment createSafe(long address)

Like create, but returns null if address is NULL.

Annotations
@Nullable
createSafeback to summary
public static BGFXAttachment.Buffer createSafe(long address, int capacity)

Like create, but returns null if address is NULL.

Annotations
@Nullable
handleback to summary
public short handle()

render target texture handle

Annotations
@NativeType:bgfx_texture_handle_t
handleback to summary
public BGFXAttachment handle(short value)

Sets the specified value to the handle field.

layerback to summary
public short layer()

cubemap side or depth layer/slice to use

Annotations
@NativeType:uint16_t
layerback to summary
public BGFXAttachment layer(short value)

Sets the specified value to the layer field.

mallocback to summary
public static BGFXAttachment malloc()

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

mallocback to summary
public static BGFXAttachment.Buffer malloc(int capacity)

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

Parameters
capacity:int

the buffer capacity

mallocback to summary
public static BGFXAttachment malloc(MemoryStack stack)

Returns a new BGFXAttachment instance allocated on the specified MemoryStack.

Parameters
stack:MemoryStack

the stack from which to allocate

mallocback to summary
public static BGFXAttachment.Buffer malloc(int capacity, MemoryStack stack)

Returns a new BGFXAttachment.Buffer instance allocated on the specified MemoryStack.

Parameters
capacity:int

the buffer capacity

stack:MemoryStack

the stack from which to allocate

mallocStackback to summary
public static BGFXAttachment mallocStack()

Deprecated

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

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

Deprecated

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

Annotations
@Deprecated
mallocStackback to summary
public static BGFXAttachment.Buffer mallocStack(int capacity)

Deprecated

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

Annotations
@Deprecated
mallocStackback to summary
public static BGFXAttachment.Buffer mallocStack(int capacity, MemoryStack stack)

Deprecated

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

Annotations
@Deprecated
mipback to summary
public short mip()

mip level

Annotations
@NativeType:uint16_t
mipback to summary
public BGFXAttachment mip(short value)

Sets the specified value to the mip field.

naccessback to summary
public static int naccess(long struct)

Unsafe version of access.

naccessback to summary
public static void naccess(long struct, int value)

Unsafe version of access.

nhandleback to summary
public static short nhandle(long struct)

Unsafe version of handle.

nhandleback to summary
public static void nhandle(long struct, short value)

Unsafe version of handle.

nlayerback to summary
public static short nlayer(long struct)

Unsafe version of layer.

nlayerback to summary
public static void nlayer(long struct, short value)

Unsafe version of layer.

nmipback to summary
public static short nmip(long struct)

Unsafe version of mip.

nmipback to summary
public static void nmip(long struct, short value)

Unsafe version of mip.

nnumLayersback to summary
public static short nnumLayers(long struct)

Unsafe version of numLayers.

nnumLayersback to summary
public static void nnumLayers(long struct, short value)

Unsafe version of numLayers.

nresolveback to summary
public static byte nresolve(long struct)

Unsafe version of resolve.

nresolveback to summary
public static void nresolve(long struct, byte value)

Unsafe version of resolve.

numLayersback to summary
public short numLayers()

number of texture layer/slice(s) in array to use

Annotations
@NativeType:uint16_t
numLayersback to summary
public BGFXAttachment numLayers(short value)

Sets the specified value to the numLayers field.

resolveback to summary
public byte resolve()

resolve flags. One of:

RESOLVE_NONERESOLVE_AUTO_GEN_MIPS
Annotations
@NativeType:uint8_t
resolveback to summary
public BGFXAttachment resolve(byte value)

Sets the specified value to the resolve field.

setback to summary
public BGFXAttachment set(int access, short handle, short mip, short layer, short numLayers, byte resolve)

Initializes this struct with the specified values.

setback to summary
public BGFXAttachment set(BGFXAttachment src)

Copies the specified struct data to this struct.

Parameters
src:BGFXAttachment

the source struct

Returns:BGFXAttachment

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
org.lwjgl.bgfx back to summary

public Class BGFXAttachment.Buffer

extends StructBuffer<BGFXAttachment, BGFXAttachment.Buffer>
implements NativeResource
Class Inheritance
All Implemented Interfaces
org.lwjgl.system.NativeResource, java.lang.AutoCloseable

An array of BGFXAttachment structs.

Field Summary

Modifier and TypeField and Description
private static final BGFXAttachment

Constructor Summary

AccessConstructor and Description
public
Buffer(ByteBuffer container)

Creates a new BGFXAttachment.Buffer instance backed by the specified container.

public
Buffer(long address, int cap)

pack-priv
Buffer(long address, ByteBuffer container, int mark, int pos, int lim, int cap)

Method Summary

Modifier and TypeMethod and Description
public int

Returns:

the value of the BGFXAttachment#access field.
access
()

public BGFXAttachment.Buffer
access(int value)

Sets the specified value to the BGFXAttachment#access field.

protected BGFXAttachment
public short

Returns:

the value of the BGFXAttachment#handle field.
handle
()

public BGFXAttachment.Buffer
handle(short value)

Sets the specified value to the BGFXAttachment#handle field.

public short

Returns:

the value of the BGFXAttachment#layer field.
layer
()

public BGFXAttachment.Buffer
layer(short value)

Sets the specified value to the BGFXAttachment#layer field.

public short

Returns:

the value of the BGFXAttachment#mip field.
mip
()

public BGFXAttachment.Buffer
mip(short value)

Sets the specified value to the BGFXAttachment#mip field.

public short

Returns:

the value of the BGFXAttachment#numLayers field.
numLayers
()

public BGFXAttachment.Buffer
numLayers(short value)

Sets the specified value to the BGFXAttachment#numLayers field.

public byte

Returns:

the value of the BGFXAttachment#resolve field.
resolve
()

public BGFXAttachment.Buffer
resolve(byte value)

Sets the specified value to the BGFXAttachment#resolve field.

protected BGFXAttachment.Buffer
Inherited from org.lwjgl.system.StructBuffer:
applyapplyforEachgetgetgetgetiteratorparallelStreamputputsizeofspliteratorstream

Field Detail

ELEMENT_FACTORYback to summary
private static final BGFXAttachment ELEMENT_FACTORY

Constructor Detail

Bufferback to summary
public Buffer(ByteBuffer container)

Creates a new BGFXAttachment.Buffer instance backed by the specified container.

Changes to the container's content will be visible to the struct buffer instance and vice versa. The two buffers' position, limit, and mark values will be independent. The new buffer's position will be zero, its capacity and its limit will be the number of bytes remaining in this buffer divided by BGFXAttachment#SIZEOF, and its mark will be undefined.

The created buffer instance holds a strong reference to the container object.

Bufferback to summary
public Buffer(long address, int cap)
Bufferback to summary
pack-priv Buffer(long address, ByteBuffer container, int mark, int pos, int lim, int cap)

Method Detail

accessback to summary
public int access()
Returns:int

the value of the BGFXAttachment#access field.

Annotations
@NativeType:bgfx_access_t
accessback to summary
public BGFXAttachment.Buffer access(int value)

Sets the specified value to the BGFXAttachment#access field.

getElementFactoryback to summary
protected BGFXAttachment getElementFactory()

Implements abstract org.lwjgl.system.StructBuffer.getElementFactory.

Annotations
@Override
handleback to summary
public short handle()
Returns:short

the value of the BGFXAttachment#handle field.

Annotations
@NativeType:bgfx_texture_handle_t
handleback to summary
public BGFXAttachment.Buffer handle(short value)

Sets the specified value to the BGFXAttachment#handle field.

layerback to summary
public short layer()
Returns:short

the value of the BGFXAttachment#layer field.

Annotations
@NativeType:uint16_t
layerback to summary
public BGFXAttachment.Buffer layer(short value)

Sets the specified value to the BGFXAttachment#layer field.

mipback to summary
public short mip()
Returns:short

the value of the BGFXAttachment#mip field.

Annotations
@NativeType:uint16_t
mipback to summary
public BGFXAttachment.Buffer mip(short value)

Sets the specified value to the BGFXAttachment#mip field.

numLayersback to summary
public short numLayers()
Returns:short

the value of the BGFXAttachment#numLayers field.

Annotations
@NativeType:uint16_t
numLayersback to summary
public BGFXAttachment.Buffer numLayers(short value)

Sets the specified value to the BGFXAttachment#numLayers field.

resolveback to summary
public byte resolve()
Returns:byte

the value of the BGFXAttachment#resolve field.

Annotations
@NativeType:uint8_t
resolveback to summary
public BGFXAttachment.Buffer resolve(byte value)

Sets the specified value to the BGFXAttachment#resolve field.

selfback to summary
protected BGFXAttachment.Buffer self()

Implements abstract org.lwjgl.system.CustomBuffer.self.

Annotations
@Override