Package org.lwjgl.bgfx
Class BGFXAttachment
- All Implemented Interfaces:
AutoCloseable
,NativeResource
,Pointer
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 Class Summary
Nested ClassesNested 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 member offsets.static 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.Fields inherited from interface org.lwjgl.system.Pointer
BITS32, BITS64, CLONG_SHIFT, CLONG_SIZE, POINTER_SHIFT, POINTER_SIZE
-
Constructor Summary
ConstructorsConstructorDescriptionBGFXAttachment
(ByteBuffer container) Creates aBGFXAttachment
instance at the current position of the specifiedByteBuffer
container. -
Method Summary
Modifier and TypeMethodDescriptionint
access()
access
(int value) Sets the specified value to theaccess
field.static BGFXAttachment
calloc()
Returns a newBGFXAttachment
instance allocated withmemCalloc
.static BGFXAttachment.Buffer
calloc
(int capacity) Returns a newBGFXAttachment.Buffer
instance allocated withmemCalloc
.static BGFXAttachment.Buffer
calloc
(int capacity, MemoryStack stack) Returns a newBGFXAttachment.Buffer
instance allocated on the specifiedMemoryStack
and initializes all its bits to zero.static BGFXAttachment
calloc
(MemoryStack stack) Returns a newBGFXAttachment
instance allocated on the specifiedMemoryStack
and initializes all its bits to zero.static BGFXAttachment
Deprecated.static BGFXAttachment.Buffer
callocStack
(int capacity) Deprecated.static BGFXAttachment.Buffer
callocStack
(int capacity, MemoryStack stack) Deprecated.static BGFXAttachment
callocStack
(MemoryStack stack) Deprecated.static BGFXAttachment
create()
Returns a newBGFXAttachment
instance allocated withBufferUtils
.static BGFXAttachment.Buffer
create
(int capacity) Returns a newBGFXAttachment.Buffer
instance allocated withBufferUtils
.static BGFXAttachment
create
(long address) Returns a newBGFXAttachment
instance for the specified memory address.static BGFXAttachment.Buffer
create
(long address, int capacity) Create aBGFXAttachment.Buffer
instance at the specified memory.static @Nullable BGFXAttachment
createSafe
(long address) static @Nullable BGFXAttachment.Buffer
createSafe
(long address, int capacity) short
handle()
handle
(short value) Sets the specified value to thehandle
field.short
layer()
layer
(short value) Sets the specified value to thelayer
field.static BGFXAttachment
malloc()
Returns a newBGFXAttachment
instance allocated withmemAlloc
.static BGFXAttachment.Buffer
malloc
(int capacity) Returns a newBGFXAttachment.Buffer
instance allocated withmemAlloc
.static BGFXAttachment.Buffer
malloc
(int capacity, MemoryStack stack) Returns a newBGFXAttachment.Buffer
instance allocated on the specifiedMemoryStack
.static BGFXAttachment
malloc
(MemoryStack stack) Returns a newBGFXAttachment
instance allocated on the specifiedMemoryStack
.static BGFXAttachment
Deprecated.static BGFXAttachment.Buffer
mallocStack
(int capacity) Deprecated.static BGFXAttachment.Buffer
mallocStack
(int capacity, MemoryStack stack) Deprecated.static BGFXAttachment
mallocStack
(MemoryStack stack) Deprecated.short
mip()
mip
(short value) Sets the specified value to themip
field.static int
naccess
(long struct) Unsafe version ofaccess()
.static void
naccess
(long struct, int value) Unsafe version ofaccess
.static short
nhandle
(long struct) Unsafe version ofhandle()
.static void
nhandle
(long struct, short value) Unsafe version ofhandle
.static short
nlayer
(long struct) Unsafe version oflayer()
.static void
nlayer
(long struct, short value) Unsafe version oflayer
.static short
nmip
(long struct) Unsafe version ofmip()
.static void
nmip
(long struct, short value) Unsafe version ofmip
.static short
nnumLayers
(long struct) Unsafe version ofnumLayers()
.static void
nnumLayers
(long struct, short value) Unsafe version ofnumLayers
.static byte
nresolve
(long struct) Unsafe version ofresolve()
.static void
nresolve
(long struct, byte value) Unsafe version ofresolve
.short
numLayers
(short value) Sets the specified value to thenumLayers
field.byte
resolve()
resolve
(byte value) Sets the specified value to theresolve
field.set
(int access, short handle, short mip, short layer, short numLayers, byte resolve) Initializes this struct with the specified values.set
(BGFXAttachment src) Copies the specified struct data to this struct.int
sizeof()
Returnssizeof(struct)
.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. -
ACCESS
public static final int ACCESSThe struct member offsets. -
HANDLE
public static final int HANDLEThe struct member offsets. -
MIP
public static final int MIPThe struct member offsets. -
LAYER
public static final int LAYERThe struct member offsets. -
NUMLAYERS
public static final int NUMLAYERSThe struct member offsets. -
RESOLVE
public static final int RESOLVEThe struct member offsets.
-
-
Constructor Details
-
BGFXAttachment
Creates aBGFXAttachment
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<BGFXAttachment>
-
access
public int access()- Returns:
- the value of the
access
field.
-
handle
public short handle()- Returns:
- the value of the
handle
field.
-
mip
public short mip()- Returns:
- the value of the
mip
field.
-
layer
public short layer()- Returns:
- the value of the
layer
field.
-
numLayers
public short numLayers()- Returns:
- the value of the
numLayers
field.
-
resolve
public byte resolve()- Returns:
- the value of the
resolve
field.
-
access
Sets the specified value to theaccess
field. -
handle
Sets the specified value to thehandle
field. -
mip
Sets the specified value to themip
field. -
layer
Sets the specified value to thelayer
field. -
numLayers
Sets the specified value to thenumLayers
field. -
resolve
Sets the specified value to theresolve
field. -
set
public BGFXAttachment set(int access, short handle, short mip, short layer, short numLayers, byte resolve) 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 newBGFXAttachment
instance allocated withmemAlloc
. The instance must be explicitly freed. -
calloc
Returns a newBGFXAttachment
instance allocated withmemCalloc
. The instance must be explicitly freed. -
create
Returns a newBGFXAttachment
instance allocated withBufferUtils
. -
create
Returns a newBGFXAttachment
instance for the specified memory address. -
createSafe
-
malloc
Returns a newBGFXAttachment.Buffer
instance allocated withmemAlloc
. The instance must be explicitly freed.- Parameters:
capacity
- the buffer capacity
-
calloc
Returns a newBGFXAttachment.Buffer
instance allocated withmemCalloc
. The instance must be explicitly freed.- Parameters:
capacity
- the buffer capacity
-
create
Returns a newBGFXAttachment.Buffer
instance allocated withBufferUtils
.- Parameters:
capacity
- the buffer capacity
-
create
Create aBGFXAttachment.Buffer
instance at the specified memory.- Parameters:
address
- the memory addresscapacity
- the buffer capacity
-
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. -
mallocStack
Deprecated.Deprecated for removal in 3.4.0. Usemalloc(int, MemoryStack)
instead. -
callocStack
Deprecated.Deprecated for removal in 3.4.0. Usecalloc(int, MemoryStack)
instead. -
mallocStack
Deprecated.Deprecated for removal in 3.4.0. Usemalloc(int, MemoryStack)
instead. -
callocStack
Deprecated.Deprecated for removal in 3.4.0. Usecalloc(int, MemoryStack)
instead. -
malloc
Returns a newBGFXAttachment
instance allocated on the specifiedMemoryStack
.- Parameters:
stack
- the stack from which to allocate
-
calloc
Returns a newBGFXAttachment
instance allocated on the specifiedMemoryStack
and initializes all its bits to zero.- Parameters:
stack
- the stack from which to allocate
-
malloc
Returns a newBGFXAttachment.Buffer
instance allocated on the specifiedMemoryStack
.- Parameters:
capacity
- the buffer capacitystack
- the stack from which to allocate
-
calloc
Returns a newBGFXAttachment.Buffer
instance allocated on the specifiedMemoryStack
and initializes all its bits to zero.- Parameters:
capacity
- the buffer capacitystack
- the stack from which to allocate
-
naccess
public static int naccess(long struct) Unsafe version ofaccess()
. -
nhandle
public static short nhandle(long struct) Unsafe version ofhandle()
. -
nmip
public static short nmip(long struct) Unsafe version ofmip()
. -
nlayer
public static short nlayer(long struct) Unsafe version oflayer()
. -
nnumLayers
public static short nnumLayers(long struct) Unsafe version ofnumLayers()
. -
nresolve
public static byte nresolve(long struct) Unsafe version ofresolve()
. -
naccess
public static void naccess(long struct, int value) Unsafe version ofaccess
. -
nhandle
public static void nhandle(long struct, short value) Unsafe version ofhandle
. -
nmip
public static void nmip(long struct, short value) Unsafe version ofmip
. -
nlayer
public static void nlayer(long struct, short value) Unsafe version oflayer
. -
nnumLayers
public static void nnumLayers(long struct, short value) Unsafe version ofnumLayers
. -
nresolve
public static void nresolve(long struct, byte value) Unsafe version ofresolve
.
-