Package org.lwjgl.bgfx
Class BGFXAttachment
- java.lang.Object
-
- org.lwjgl.system.Pointer.Default
-
- org.lwjgl.system.Struct
-
- org.lwjgl.bgfx.BGFXAttachment
-
- All Implemented Interfaces:
java.lang.AutoCloseable
,org.lwjgl.system.NativeResource
,org.lwjgl.system.Pointer
public class BGFXAttachment extends org.lwjgl.system.Struct implements org.lwjgl.system.NativeResource
Frame buffer texture attachment info.Member documentation
access
– attachment accesshandle
– render target texture handlemip
– mip levellayer
– cubemap side or depth layer/sliceresolve
– resolve flags. One of:RESOLVE_NONE
RESOLVE_AUTO_GEN_MIPS
Layout
struct bgfx_attachment_t { bgfx_access_t access; bgfx_texture_handle_t handle; uint16_t mip; uint16_t layer; uint8_t resolve; }
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
BGFXAttachment.Buffer
An array ofBGFXAttachment
structs.
-
Constructor Summary
Constructors Constructor Description BGFXAttachment(java.nio.ByteBuffer container)
Creates aBGFXAttachment
instance at the current position of the specifiedByteBuffer
container.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description int
access()
Returns the value of theaccess
field.BGFXAttachment
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
callocStack()
Returns a newBGFXAttachment
instance allocated on the thread-localMemoryStack
and initializes all its bits to zero.static BGFXAttachment.Buffer
callocStack(int capacity)
Returns a newBGFXAttachment.Buffer
instance allocated on the thread-localMemoryStack
and initializes all its bits to zero.static BGFXAttachment.Buffer
callocStack(int capacity, org.lwjgl.system.MemoryStack stack)
Returns a newBGFXAttachment.Buffer
instance allocated on the specifiedMemoryStack
and initializes all its bits to zero.static BGFXAttachment
callocStack(org.lwjgl.system.MemoryStack stack)
Returns a newBGFXAttachment
instance allocated on the specifiedMemoryStack
and initializes all its bits to zero.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 BGFXAttachment
createSafe(long address)
static BGFXAttachment.Buffer
createSafe(long address, int capacity)
short
handle()
Returns the value of thehandle
field.BGFXAttachment
handle(short value)
Sets the specified value to thehandle
field.short
layer()
Returns the value of thelayer
field.BGFXAttachment
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
mallocStack()
Returns a newBGFXAttachment
instance allocated on the thread-localMemoryStack
.static BGFXAttachment.Buffer
mallocStack(int capacity)
Returns a newBGFXAttachment.Buffer
instance allocated on the thread-localMemoryStack
.static BGFXAttachment.Buffer
mallocStack(int capacity, org.lwjgl.system.MemoryStack stack)
Returns a newBGFXAttachment.Buffer
instance allocated on the specifiedMemoryStack
.static BGFXAttachment
mallocStack(org.lwjgl.system.MemoryStack stack)
Returns a newBGFXAttachment
instance allocated on the specifiedMemoryStack
.short
mip()
Returns the value of themip
field.BGFXAttachment
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 byte
nresolve(long struct)
Unsafe version ofresolve()
.static void
nresolve(long struct, byte value)
Unsafe version ofresolve
.byte
resolve()
Returns the value of theresolve
field.BGFXAttachment
resolve(byte value)
Sets the specified value to theresolve
field.BGFXAttachment
set(int access, short handle, short mip, short layer, byte resolve)
Initializes this struct with the specified values.BGFXAttachment
set(BGFXAttachment src)
Copies the specified struct data to this struct.int
sizeof()
-
-
-
Constructor Detail
-
BGFXAttachment
public BGFXAttachment(java.nio.ByteBuffer container)
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 Detail
-
sizeof
public int sizeof()
- Specified by:
sizeof
in classorg.lwjgl.system.Struct
-
access
public int access()
Returns the value of theaccess
field.
-
handle
public short handle()
Returns the value of thehandle
field.
-
mip
public short mip()
Returns the value of themip
field.
-
layer
public short layer()
Returns the value of thelayer
field.
-
resolve
public byte resolve()
Returns the value of theresolve
field.
-
access
public BGFXAttachment access(int value)
Sets the specified value to theaccess
field.
-
handle
public BGFXAttachment handle(short value)
Sets the specified value to thehandle
field.
-
mip
public BGFXAttachment mip(short value)
Sets the specified value to themip
field.
-
layer
public BGFXAttachment layer(short value)
Sets the specified value to thelayer
field.
-
resolve
public BGFXAttachment resolve(byte value)
Sets the specified value to theresolve
field.
-
set
public BGFXAttachment set(int access, short handle, short mip, short layer, byte resolve)
Initializes this struct with the specified values.
-
set
public BGFXAttachment set(BGFXAttachment src)
Copies the specified struct data to this struct.- Parameters:
src
- the source struct- Returns:
- this struct
-
malloc
public static BGFXAttachment malloc()
Returns a newBGFXAttachment
instance allocated withmemAlloc
. The instance must be explicitly freed.
-
calloc
public static BGFXAttachment calloc()
Returns a newBGFXAttachment
instance allocated withmemCalloc
. The instance must be explicitly freed.
-
create
public static BGFXAttachment create()
Returns a newBGFXAttachment
instance allocated withBufferUtils
.
-
create
public static BGFXAttachment create(long address)
Returns a newBGFXAttachment
instance for the specified memory address.
-
createSafe
@Nullable public static BGFXAttachment createSafe(long address)
-
malloc
public static BGFXAttachment.Buffer malloc(int capacity)
Returns a newBGFXAttachment.Buffer
instance allocated withmemAlloc
. The instance must be explicitly freed.- Parameters:
capacity
- the buffer capacity
-
calloc
public static BGFXAttachment.Buffer calloc(int capacity)
Returns a newBGFXAttachment.Buffer
instance allocated withmemCalloc
. The instance must be explicitly freed.- Parameters:
capacity
- the buffer capacity
-
create
public static BGFXAttachment.Buffer create(int capacity)
Returns a newBGFXAttachment.Buffer
instance allocated withBufferUtils
.- Parameters:
capacity
- the buffer capacity
-
create
public static BGFXAttachment.Buffer create(long address, int capacity)
Create aBGFXAttachment.Buffer
instance at the specified memory.- Parameters:
address
- the memory addresscapacity
- the buffer capacity
-
createSafe
@Nullable public static BGFXAttachment.Buffer createSafe(long address, int capacity)
-
mallocStack
public static BGFXAttachment mallocStack()
Returns a newBGFXAttachment
instance allocated on the thread-localMemoryStack
.
-
callocStack
public static BGFXAttachment callocStack()
Returns a newBGFXAttachment
instance allocated on the thread-localMemoryStack
and initializes all its bits to zero.
-
mallocStack
public static BGFXAttachment mallocStack(org.lwjgl.system.MemoryStack stack)
Returns a newBGFXAttachment
instance allocated on the specifiedMemoryStack
.- Parameters:
stack
- the stack from which to allocate
-
callocStack
public static BGFXAttachment callocStack(org.lwjgl.system.MemoryStack stack)
Returns a newBGFXAttachment
instance allocated on the specifiedMemoryStack
and initializes all its bits to zero.- Parameters:
stack
- the stack from which to allocate
-
mallocStack
public static BGFXAttachment.Buffer mallocStack(int capacity)
Returns a newBGFXAttachment.Buffer
instance allocated on the thread-localMemoryStack
.- Parameters:
capacity
- the buffer capacity
-
callocStack
public static BGFXAttachment.Buffer callocStack(int capacity)
Returns a newBGFXAttachment.Buffer
instance allocated on the thread-localMemoryStack
and initializes all its bits to zero.- Parameters:
capacity
- the buffer capacity
-
mallocStack
public static BGFXAttachment.Buffer mallocStack(int capacity, org.lwjgl.system.MemoryStack stack)
Returns a newBGFXAttachment.Buffer
instance allocated on the specifiedMemoryStack
.- Parameters:
stack
- the stack from which to allocatecapacity
- the buffer capacity
-
callocStack
public static BGFXAttachment.Buffer callocStack(int capacity, org.lwjgl.system.MemoryStack stack)
Returns a newBGFXAttachment.Buffer
instance allocated on the specifiedMemoryStack
and initializes all its bits to zero.- Parameters:
stack
- the stack from which to allocatecapacity
- the buffer capacity
-
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()
.
-
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
.
-
nresolve
public static void nresolve(long struct, byte value)
Unsafe version ofresolve
.
-
-