Package org.lwjgl.bgfx
Class BGFXTextureInfo
- java.lang.Object
-
- org.lwjgl.system.Pointer.Default
-
- org.lwjgl.system.Struct
-
- org.lwjgl.bgfx.BGFXTextureInfo
-
- All Implemented Interfaces:
java.lang.AutoCloseable
,org.lwjgl.system.NativeResource
,org.lwjgl.system.Pointer
public class BGFXTextureInfo extends org.lwjgl.system.Struct implements org.lwjgl.system.NativeResource
Texture info.Member documentation
format
– texture format. One of:storageSize
– total amount of bytes required to store texturewidth
– texture widthheight
– texture heightdepth
– texture depthnumLayers
– number of layers in texture arraynumMips
– number of MIP mapsbitsPerPixel
– format bits per pixelcubeMap
– texture is cubemap
Layout
struct bgfx_texture_info_t { bgfx_texture_format_t format; uint32_t storageSize; uint16_t width; uint16_t height; uint16_t depth; uint16_t numLayers; uint8_t numMips; uint8_t bitsPerPixel; bool cubeMap; }
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
BGFXTextureInfo.Buffer
An array ofBGFXTextureInfo
structs.
-
Field Summary
Fields Modifier and Type Field Description static int
ALIGNOF
The struct alignment in bytes.static int
BITSPERPIXEL
CUBEMAP
DEPTH
FORMAT
HEIGHT
NUMLAYERS
NUMMIPSThe struct member offsets.static int
SIZEOF
The struct size in bytes.static int
STORAGESIZE
WIDTHThe struct member offsets.
-
Constructor Summary
Constructors Constructor Description BGFXTextureInfo(java.nio.ByteBuffer container)
Creates aBGFXTextureInfo
instance at the current position of the specifiedByteBuffer
container.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description byte
bitsPerPixel()
Returns the value of thebitsPerPixel
field.static BGFXTextureInfo
calloc()
Returns a newBGFXTextureInfo
instance allocated withmemCalloc
.static BGFXTextureInfo.Buffer
calloc(int capacity)
Returns a newBGFXTextureInfo.Buffer
instance allocated withmemCalloc
.static BGFXTextureInfo
callocStack()
Returns a newBGFXTextureInfo
instance allocated on the thread-localMemoryStack
and initializes all its bits to zero.static BGFXTextureInfo.Buffer
callocStack(int capacity)
Returns a newBGFXTextureInfo.Buffer
instance allocated on the thread-localMemoryStack
and initializes all its bits to zero.static BGFXTextureInfo.Buffer
callocStack(int capacity, org.lwjgl.system.MemoryStack stack)
Returns a newBGFXTextureInfo.Buffer
instance allocated on the specifiedMemoryStack
and initializes all its bits to zero.static BGFXTextureInfo
callocStack(org.lwjgl.system.MemoryStack stack)
Returns a newBGFXTextureInfo
instance allocated on the specifiedMemoryStack
and initializes all its bits to zero.static BGFXTextureInfo
create()
Returns a newBGFXTextureInfo
instance allocated withBufferUtils
.static BGFXTextureInfo.Buffer
create(int capacity)
Returns a newBGFXTextureInfo.Buffer
instance allocated withBufferUtils
.static BGFXTextureInfo
create(long address)
Returns a newBGFXTextureInfo
instance for the specified memory address.static BGFXTextureInfo.Buffer
create(long address, int capacity)
Create aBGFXTextureInfo.Buffer
instance at the specified memory.static BGFXTextureInfo
createSafe(long address)
static BGFXTextureInfo.Buffer
createSafe(long address, int capacity)
boolean
cubeMap()
Returns the value of thecubeMap
field.short
depth()
Returns the value of thedepth
field.int
format()
Returns the value of theformat
field.short
height()
Returns the value of theheight
field.static BGFXTextureInfo
malloc()
Returns a newBGFXTextureInfo
instance allocated withmemAlloc
.static BGFXTextureInfo.Buffer
malloc(int capacity)
Returns a newBGFXTextureInfo.Buffer
instance allocated withmemAlloc
.static BGFXTextureInfo
mallocStack()
Returns a newBGFXTextureInfo
instance allocated on the thread-localMemoryStack
.static BGFXTextureInfo.Buffer
mallocStack(int capacity)
Returns a newBGFXTextureInfo.Buffer
instance allocated on the thread-localMemoryStack
.static BGFXTextureInfo.Buffer
mallocStack(int capacity, org.lwjgl.system.MemoryStack stack)
Returns a newBGFXTextureInfo.Buffer
instance allocated on the specifiedMemoryStack
.static BGFXTextureInfo
mallocStack(org.lwjgl.system.MemoryStack stack)
Returns a newBGFXTextureInfo
instance allocated on the specifiedMemoryStack
.static byte
nbitsPerPixel(long struct)
Unsafe version ofbitsPerPixel()
.static boolean
ncubeMap(long struct)
Unsafe version ofcubeMap()
.static short
ndepth(long struct)
Unsafe version ofdepth()
.static int
nformat(long struct)
Unsafe version offormat()
.static short
nheight(long struct)
Unsafe version ofheight()
.static short
nnumLayers(long struct)
Unsafe version ofnumLayers()
.static byte
nnumMips(long struct)
Unsafe version ofnumMips()
.static int
nstorageSize(long struct)
Unsafe version ofstorageSize()
.short
numLayers()
Returns the value of thenumLayers
field.byte
numMips()
Returns the value of thenumMips
field.static short
nwidth(long struct)
Unsafe version ofwidth()
.int
sizeof()
int
storageSize()
Returns the value of thestorageSize
field.short
width()
Returns the value of thewidth
field.
-
-
-
Constructor Detail
-
BGFXTextureInfo
public BGFXTextureInfo(java.nio.ByteBuffer container)
Creates aBGFXTextureInfo
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
-
format
public int format()
Returns the value of theformat
field.
-
storageSize
public int storageSize()
Returns the value of thestorageSize
field.
-
width
public short width()
Returns the value of thewidth
field.
-
height
public short height()
Returns the value of theheight
field.
-
depth
public short depth()
Returns the value of thedepth
field.
-
numLayers
public short numLayers()
Returns the value of thenumLayers
field.
-
numMips
public byte numMips()
Returns the value of thenumMips
field.
-
bitsPerPixel
public byte bitsPerPixel()
Returns the value of thebitsPerPixel
field.
-
cubeMap
public boolean cubeMap()
Returns the value of thecubeMap
field.
-
malloc
public static BGFXTextureInfo malloc()
Returns a newBGFXTextureInfo
instance allocated withmemAlloc
. The instance must be explicitly freed.
-
calloc
public static BGFXTextureInfo calloc()
Returns a newBGFXTextureInfo
instance allocated withmemCalloc
. The instance must be explicitly freed.
-
create
public static BGFXTextureInfo create()
Returns a newBGFXTextureInfo
instance allocated withBufferUtils
.
-
create
public static BGFXTextureInfo create(long address)
Returns a newBGFXTextureInfo
instance for the specified memory address.
-
createSafe
@Nullable public static BGFXTextureInfo createSafe(long address)
-
malloc
public static BGFXTextureInfo.Buffer malloc(int capacity)
Returns a newBGFXTextureInfo.Buffer
instance allocated withmemAlloc
. The instance must be explicitly freed.- Parameters:
capacity
- the buffer capacity
-
calloc
public static BGFXTextureInfo.Buffer calloc(int capacity)
Returns a newBGFXTextureInfo.Buffer
instance allocated withmemCalloc
. The instance must be explicitly freed.- Parameters:
capacity
- the buffer capacity
-
create
public static BGFXTextureInfo.Buffer create(int capacity)
Returns a newBGFXTextureInfo.Buffer
instance allocated withBufferUtils
.- Parameters:
capacity
- the buffer capacity
-
create
public static BGFXTextureInfo.Buffer create(long address, int capacity)
Create aBGFXTextureInfo.Buffer
instance at the specified memory.- Parameters:
address
- the memory addresscapacity
- the buffer capacity
-
createSafe
@Nullable public static BGFXTextureInfo.Buffer createSafe(long address, int capacity)
-
mallocStack
public static BGFXTextureInfo mallocStack()
Returns a newBGFXTextureInfo
instance allocated on the thread-localMemoryStack
.
-
callocStack
public static BGFXTextureInfo callocStack()
Returns a newBGFXTextureInfo
instance allocated on the thread-localMemoryStack
and initializes all its bits to zero.
-
mallocStack
public static BGFXTextureInfo mallocStack(org.lwjgl.system.MemoryStack stack)
Returns a newBGFXTextureInfo
instance allocated on the specifiedMemoryStack
.- Parameters:
stack
- the stack from which to allocate
-
callocStack
public static BGFXTextureInfo callocStack(org.lwjgl.system.MemoryStack stack)
Returns a newBGFXTextureInfo
instance allocated on the specifiedMemoryStack
and initializes all its bits to zero.- Parameters:
stack
- the stack from which to allocate
-
mallocStack
public static BGFXTextureInfo.Buffer mallocStack(int capacity)
Returns a newBGFXTextureInfo.Buffer
instance allocated on the thread-localMemoryStack
.- Parameters:
capacity
- the buffer capacity
-
callocStack
public static BGFXTextureInfo.Buffer callocStack(int capacity)
Returns a newBGFXTextureInfo.Buffer
instance allocated on the thread-localMemoryStack
and initializes all its bits to zero.- Parameters:
capacity
- the buffer capacity
-
mallocStack
public static BGFXTextureInfo.Buffer mallocStack(int capacity, org.lwjgl.system.MemoryStack stack)
Returns a newBGFXTextureInfo.Buffer
instance allocated on the specifiedMemoryStack
.- Parameters:
stack
- the stack from which to allocatecapacity
- the buffer capacity
-
callocStack
public static BGFXTextureInfo.Buffer callocStack(int capacity, org.lwjgl.system.MemoryStack stack)
Returns a newBGFXTextureInfo.Buffer
instance allocated on the specifiedMemoryStack
and initializes all its bits to zero.- Parameters:
stack
- the stack from which to allocatecapacity
- the buffer capacity
-
nformat
public static int nformat(long struct)
Unsafe version offormat()
.
-
nstorageSize
public static int nstorageSize(long struct)
Unsafe version ofstorageSize()
.
-
nwidth
public static short nwidth(long struct)
Unsafe version ofwidth()
.
-
nheight
public static short nheight(long struct)
Unsafe version ofheight()
.
-
ndepth
public static short ndepth(long struct)
Unsafe version ofdepth()
.
-
nnumLayers
public static short nnumLayers(long struct)
Unsafe version ofnumLayers()
.
-
nnumMips
public static byte nnumMips(long struct)
Unsafe version ofnumMips()
.
-
nbitsPerPixel
public static byte nbitsPerPixel(long struct)
Unsafe version ofbitsPerPixel()
.
-
ncubeMap
public static boolean ncubeMap(long struct)
Unsafe version ofcubeMap()
.
-
-