Package org.lwjgl.bgfx
Class BGFXTextureInfo
- All Implemented Interfaces:
AutoCloseable
,NativeResource
,Pointer
Texture info.
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/interfaces inherited from class org.lwjgl.system.Struct
Struct.StructValidation
Nested classes/interfaces inherited from interface org.lwjgl.system.Pointer
Pointer.Default
-
Field Summary
Modifier and TypeFieldDescriptionstatic 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 member offsets.static final int
The struct member offsets.static final int
The struct size in bytes.static final int
The struct member offsets.static final int
The struct member offsets.Fields inherited from interface org.lwjgl.system.Pointer
BITS32, BITS64, CLONG_SHIFT, CLONG_SIZE, POINTER_SHIFT, POINTER_SIZE
-
Constructor Summary
ConstructorDescriptionBGFXTextureInfo
(ByteBuffer container) Creates aBGFXTextureInfo
instance at the current position of the specifiedByteBuffer
container. -
Method Summary
Modifier and TypeMethodDescriptionbyte
format bits per pixelstatic BGFXTextureInfo
calloc()
Returns a newBGFXTextureInfo
instance allocated withmemCalloc
.static BGFXTextureInfo.Buffer
calloc
(int capacity) Returns a newBGFXTextureInfo.Buffer
instance allocated withmemCalloc
.static BGFXTextureInfo.Buffer
calloc
(int capacity, MemoryStack stack) Returns a newBGFXTextureInfo.Buffer
instance allocated on the specifiedMemoryStack
and initializes all its bits to zero.static BGFXTextureInfo
calloc
(MemoryStack stack) Returns a newBGFXTextureInfo
instance allocated on the specifiedMemoryStack
and initializes all its bits to zero.static BGFXTextureInfo
Deprecated.static BGFXTextureInfo.Buffer
callocStack
(int capacity) Deprecated.static BGFXTextureInfo.Buffer
callocStack
(int capacity, MemoryStack stack) Deprecated.static BGFXTextureInfo
callocStack
(MemoryStack stack) Deprecated.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()
texture is cubemapshort
depth()
texture depthint
format()
texture format.short
height()
texture heightstatic BGFXTextureInfo
malloc()
Returns a newBGFXTextureInfo
instance allocated withmemAlloc
.static BGFXTextureInfo.Buffer
malloc
(int capacity) Returns a newBGFXTextureInfo.Buffer
instance allocated withmemAlloc
.static BGFXTextureInfo.Buffer
malloc
(int capacity, MemoryStack stack) Returns a newBGFXTextureInfo.Buffer
instance allocated on the specifiedMemoryStack
.static BGFXTextureInfo
malloc
(MemoryStack stack) Returns a newBGFXTextureInfo
instance allocated on the specifiedMemoryStack
.static BGFXTextureInfo
Deprecated.static BGFXTextureInfo.Buffer
mallocStack
(int capacity) Deprecated.static BGFXTextureInfo.Buffer
mallocStack
(int capacity, MemoryStack stack) Deprecated.static BGFXTextureInfo
mallocStack
(MemoryStack stack) Deprecated.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
number of layers in texture arraybyte
numMips()
number of MIP mapsstatic short
nwidth
(long struct) Unsafe version ofwidth()
.int
sizeof()
Returnssizeof(struct)
.int
total amount of bytes required to store textureshort
width()
texture widthMethods 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. -
FORMAT
public static final int FORMATThe struct member offsets. -
STORAGESIZE
public static final int STORAGESIZEThe struct member offsets. -
WIDTH
public static final int WIDTHThe struct member offsets. -
HEIGHT
public static final int HEIGHTThe struct member offsets. -
DEPTH
public static final int DEPTHThe struct member offsets. -
NUMLAYERS
public static final int NUMLAYERSThe struct member offsets. -
NUMMIPS
public static final int NUMMIPSThe struct member offsets. -
BITSPERPIXEL
public static final int BITSPERPIXELThe struct member offsets. -
CUBEMAP
public static final int CUBEMAPThe struct member offsets.
-
-
Constructor Details
-
BGFXTextureInfo
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 Details
-
sizeof
public int sizeof()Description copied from class:Struct
Returnssizeof(struct)
.- Specified by:
sizeof
in classStruct<BGFXTextureInfo>
-
format
public int format()texture format. One of: -
storageSize
public int storageSize()total amount of bytes required to store texture -
width
public short width()texture width -
height
public short height()texture height -
depth
public short depth()texture depth -
numLayers
public short numLayers()number of layers in texture array -
numMips
public byte numMips()number of MIP maps -
bitsPerPixel
public byte bitsPerPixel()format bits per pixel -
cubeMap
public boolean cubeMap()texture is cubemap -
malloc
Returns a newBGFXTextureInfo
instance allocated withmemAlloc
. The instance must be explicitly freed. -
calloc
Returns a newBGFXTextureInfo
instance allocated withmemCalloc
. The instance must be explicitly freed. -
create
Returns a newBGFXTextureInfo
instance allocated withBufferUtils
. -
create
Returns a newBGFXTextureInfo
instance for the specified memory address. -
createSafe
-
malloc
Returns a newBGFXTextureInfo.Buffer
instance allocated withmemAlloc
. The instance must be explicitly freed.- Parameters:
capacity
- the buffer capacity
-
calloc
Returns a newBGFXTextureInfo.Buffer
instance allocated withmemCalloc
. The instance must be explicitly freed.- Parameters:
capacity
- the buffer capacity
-
create
Returns a newBGFXTextureInfo.Buffer
instance allocated withBufferUtils
.- Parameters:
capacity
- the buffer capacity
-
create
Create aBGFXTextureInfo.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 newBGFXTextureInfo
instance allocated on the specifiedMemoryStack
.- Parameters:
stack
- the stack from which to allocate
-
calloc
Returns a newBGFXTextureInfo
instance allocated on the specifiedMemoryStack
and initializes all its bits to zero.- Parameters:
stack
- the stack from which to allocate
-
malloc
Returns a newBGFXTextureInfo.Buffer
instance allocated on the specifiedMemoryStack
.- Parameters:
capacity
- the buffer capacitystack
- the stack from which to allocate
-
calloc
Returns a newBGFXTextureInfo.Buffer
instance allocated on the specifiedMemoryStack
and initializes all its bits to zero.- Parameters:
capacity
- the buffer capacitystack
- the stack from which to allocate
-
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()
.
-