Top Description Inners Fields Constructors Methods
org.lwjgl.bgfx

public Class BGFXTextureInfo

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

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 and Inner Type Summary

Modifier and TypeClass and Description
public static class

Field Summary

Modifier and TypeField and Description
public static final int
ALIGNOF

The struct alignment in bytes.

public static final int
BITSPERPIXEL

The struct member offsets.

public static final int
CUBEMAP

The struct member offsets.

public static final int
DEPTH

The struct member offsets.

public static final int
FORMAT

The struct member offsets.

public static final int
HEIGHT

The struct member offsets.

public static final int
NUMLAYERS

The struct member offsets.

public static final int
NUMMIPS

The struct member offsets.

public static final int
SIZEOF

The struct size in bytes.

public static final int
STORAGESIZE

The struct member offsets.

public static final int
WIDTH

The struct member offsets.

Inherited from org.lwjgl.system.Struct:
containerDEFAULT_ALIGN_ASDEFAULT_PACK_ALIGNMENT

Constructor Summary

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

public
BGFXTextureInfo(ByteBuffer container)

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

Method Summary

Modifier and TypeMethod and Description
public byte
bitsPerPixel()

format bits per pixel

public static BGFXTextureInfo
calloc()

Returns a new BGFXTextureInfo instance allocated with memCalloc.

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

Returns a new BGFXTextureInfo.Buffer instance allocated with memCalloc.

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

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

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

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

public static BGFXTextureInfo
callocStack()

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

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

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

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

Returns a new BGFXTextureInfo instance allocated with BufferUtils.

public static BGFXTextureInfo
create(long address)

Returns a new BGFXTextureInfo instance for the specified memory address.

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

Returns a new BGFXTextureInfo.Buffer instance allocated with BufferUtils.

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

Create a BGFXTextureInfo.Buffer instance at the specified memory.

public static BGFXTextureInfo
createSafe(long address)

Like create, but returns null if address is NULL.

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

Like create, but returns null if address is NULL.

public boolean
cubeMap()

texture is cubemap

public short
depth()

texture depth

public int
format()

texture format.

public short
height()

texture height

public static BGFXTextureInfo
malloc()

Returns a new BGFXTextureInfo instance allocated with memAlloc.

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

Returns a new BGFXTextureInfo.Buffer instance allocated with memAlloc.

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

Returns a new BGFXTextureInfo instance allocated on the specified MemoryStack.

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

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

public static BGFXTextureInfo
mallocStack()

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

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

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

Deprecated
Deprecated for removal in 3.4.0.
public static byte
nbitsPerPixel(long struct)

Unsafe version of bitsPerPixel.

public static boolean
ncubeMap(long struct)

Unsafe version of cubeMap.

public static short
ndepth(long struct)

Unsafe version of depth.

public static int
nformat(long struct)

Unsafe version of format.

public static short
nheight(long struct)

Unsafe version of height.

public static short
nnumLayers(long struct)

Unsafe version of numLayers.

public static byte
nnumMips(long struct)

Unsafe version of numMips.

public static int
nstorageSize(long struct)

Unsafe version of storageSize.

public short
numLayers()

number of layers in texture array

public byte
numMips()

number of MIP maps

public static short
nwidth(long struct)

Unsafe version of width.

public int
sizeof()

Implements abstract org.lwjgl.system.Struct.sizeof.

Returns sizeof(struct).
public int
storageSize()

total amount of bytes required to store texture

public short
width()

texture width

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

ALIGNOFback to summary
public static final int ALIGNOF

The struct alignment in bytes.

BITSPERPIXELback to summary
public static final int BITSPERPIXEL

The struct member offsets.

CUBEMAPback to summary
public static final int CUBEMAP

The struct member offsets.

DEPTHback to summary
public static final int DEPTH

The struct member offsets.

FORMATback to summary
public static final int FORMAT

The struct member offsets.

HEIGHTback to summary
public static final int HEIGHT

The struct member offsets.

NUMLAYERSback to summary
public static final int NUMLAYERS

The struct member offsets.

NUMMIPSback to summary
public static final int NUMMIPS

The struct member offsets.

SIZEOFback to summary
public static final int SIZEOF

The struct size in bytes.

STORAGESIZEback to summary
public static final int STORAGESIZE

The struct member offsets.

WIDTHback to summary
public static final int WIDTH

The struct member offsets.

Constructor Detail

BGFXTextureInfoback to summary
protected BGFXTextureInfo(long address, ByteBuffer container)
BGFXTextureInfoback to summary
public BGFXTextureInfo(ByteBuffer container)

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

bitsPerPixelback to summary
public byte bitsPerPixel()

format bits per pixel

Annotations
@NativeType:uint8_t
callocback to summary
public static BGFXTextureInfo calloc()

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

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

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

Parameters
capacity:int

the buffer capacity

callocback to summary
public static BGFXTextureInfo calloc(MemoryStack stack)

Returns a new BGFXTextureInfo 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 BGFXTextureInfo.Buffer calloc(int capacity, MemoryStack stack)

Returns a new BGFXTextureInfo.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 BGFXTextureInfo callocStack()

Deprecated

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

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

Deprecated

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

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

Deprecated

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

Annotations
@Deprecated
callocStackback to summary
public static BGFXTextureInfo.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 BGFXTextureInfo 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 BGFXTextureInfo create()

Returns a new BGFXTextureInfo instance allocated with BufferUtils.

createback to summary
public static BGFXTextureInfo create(long address)

Returns a new BGFXTextureInfo instance for the specified memory address.

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

Returns a new BGFXTextureInfo.Buffer instance allocated with BufferUtils.

Parameters
capacity:int

the buffer capacity

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

Create a BGFXTextureInfo.Buffer instance at the specified memory.

Parameters
address:long

the memory address

capacity:int

the buffer capacity

createSafeback to summary
public static BGFXTextureInfo createSafe(long address)

Like create, but returns null if address is NULL.

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

Like create, but returns null if address is NULL.

Annotations
@Nullable
cubeMapback to summary
public boolean cubeMap()

texture is cubemap

Annotations
@NativeType:bool
depthback to summary
public short depth()

texture depth

Annotations
@NativeType:uint16_t
formatback to summary
public int format()

texture format. One of:

TEXTURE_FORMAT_BC1TEXTURE_FORMAT_BC2TEXTURE_FORMAT_BC3TEXTURE_FORMAT_BC4
TEXTURE_FORMAT_BC5TEXTURE_FORMAT_BC6HTEXTURE_FORMAT_BC7TEXTURE_FORMAT_ETC1
TEXTURE_FORMAT_ETC2TEXTURE_FORMAT_ETC2ATEXTURE_FORMAT_ETC2A1TEXTURE_FORMAT_PTC12
TEXTURE_FORMAT_PTC14TEXTURE_FORMAT_PTC12ATEXTURE_FORMAT_PTC14ATEXTURE_FORMAT_PTC22
TEXTURE_FORMAT_PTC24TEXTURE_FORMAT_ATCTEXTURE_FORMAT_ATCETEXTURE_FORMAT_ATCI
TEXTURE_FORMAT_ASTC4x4TEXTURE_FORMAT_ASTC5X4TEXTURE_FORMAT_ASTC5x5TEXTURE_FORMAT_ASTC6X5
TEXTURE_FORMAT_ASTC6x6TEXTURE_FORMAT_ASTC8x5TEXTURE_FORMAT_ASTC8x6TEXTURE_FORMAT_ASTC8X8
TEXTURE_FORMAT_ASTC10x5TEXTURE_FORMAT_ASTC10X6TEXTURE_FORMAT_ASTC10X8TEXTURE_FORMAT_ASTC10X10
TEXTURE_FORMAT_ASTC12X10TEXTURE_FORMAT_ASTC12X12TEXTURE_FORMAT_UNKNOWNTEXTURE_FORMAT_R1
TEXTURE_FORMAT_A8TEXTURE_FORMAT_R8TEXTURE_FORMAT_R8ITEXTURE_FORMAT_R8U
TEXTURE_FORMAT_R8STEXTURE_FORMAT_R16TEXTURE_FORMAT_R16ITEXTURE_FORMAT_R16U
TEXTURE_FORMAT_R16FTEXTURE_FORMAT_R16STEXTURE_FORMAT_R32ITEXTURE_FORMAT_R32U
TEXTURE_FORMAT_R32FTEXTURE_FORMAT_RG8TEXTURE_FORMAT_RG8ITEXTURE_FORMAT_RG8U
TEXTURE_FORMAT_RG8STEXTURE_FORMAT_RG16TEXTURE_FORMAT_RG16ITEXTURE_FORMAT_RG16U
TEXTURE_FORMAT_RG16FTEXTURE_FORMAT_RG16STEXTURE_FORMAT_RG32ITEXTURE_FORMAT_RG32U
TEXTURE_FORMAT_RG32FTEXTURE_FORMAT_RGB8TEXTURE_FORMAT_RGB8ITEXTURE_FORMAT_RGB8U
TEXTURE_FORMAT_RGB8STEXTURE_FORMAT_RGB9E5FTEXTURE_FORMAT_BGRA8TEXTURE_FORMAT_RGBA8
TEXTURE_FORMAT_RGBA8ITEXTURE_FORMAT_RGBA8UTEXTURE_FORMAT_RGBA8STEXTURE_FORMAT_RGBA16
TEXTURE_FORMAT_RGBA16ITEXTURE_FORMAT_RGBA16UTEXTURE_FORMAT_RGBA16FTEXTURE_FORMAT_RGBA16S
TEXTURE_FORMAT_RGBA32ITEXTURE_FORMAT_RGBA32UTEXTURE_FORMAT_RGBA32FTEXTURE_FORMAT_B5G6R5
TEXTURE_FORMAT_R5G6B5TEXTURE_FORMAT_BGRA4TEXTURE_FORMAT_RGBA4TEXTURE_FORMAT_BGR5A1
TEXTURE_FORMAT_RGB5A1TEXTURE_FORMAT_RGB10A2TEXTURE_FORMAT_RG11B10FTEXTURE_FORMAT_UNKNOWN_DEPTH
TEXTURE_FORMAT_D16TEXTURE_FORMAT_D24TEXTURE_FORMAT_D24S8TEXTURE_FORMAT_D32
TEXTURE_FORMAT_D16FTEXTURE_FORMAT_D24FTEXTURE_FORMAT_D32FTEXTURE_FORMAT_D0S8
Annotations
@NativeType:bgfx_texture_format_t
heightback to summary
public short height()

texture height

Annotations
@NativeType:uint16_t
mallocback to summary
public static BGFXTextureInfo malloc()

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

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

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

Parameters
capacity:int

the buffer capacity

mallocback to summary
public static BGFXTextureInfo malloc(MemoryStack stack)

Returns a new BGFXTextureInfo instance allocated on the specified MemoryStack.

Parameters
stack:MemoryStack

the stack from which to allocate

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

Returns a new BGFXTextureInfo.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 BGFXTextureInfo mallocStack()

Deprecated

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

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

Deprecated

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

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

Deprecated

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

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

Deprecated

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

Annotations
@Deprecated
nbitsPerPixelback to summary
public static byte nbitsPerPixel(long struct)

Unsafe version of bitsPerPixel.

ncubeMapback to summary
public static boolean ncubeMap(long struct)

Unsafe version of cubeMap.

ndepthback to summary
public static short ndepth(long struct)

Unsafe version of depth.

nformatback to summary
public static int nformat(long struct)

Unsafe version of format.

nheightback to summary
public static short nheight(long struct)

Unsafe version of height.

nnumLayersback to summary
public static short nnumLayers(long struct)

Unsafe version of numLayers.

nnumMipsback to summary
public static byte nnumMips(long struct)

Unsafe version of numMips.

nstorageSizeback to summary
public static int nstorageSize(long struct)

Unsafe version of storageSize.

numLayersback to summary
public short numLayers()

number of layers in texture array

Annotations
@NativeType:uint16_t
numMipsback to summary
public byte numMips()

number of MIP maps

Annotations
@NativeType:uint8_t
nwidthback to summary
public static short nwidth(long struct)

Unsafe version of width.

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
storageSizeback to summary
public int storageSize()

total amount of bytes required to store texture

Annotations
@NativeType:uint32_t
widthback to summary
public short width()

texture width

Annotations
@NativeType:uint16_t
org.lwjgl.bgfx back to summary

public Class BGFXTextureInfo.Buffer

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

An array of BGFXTextureInfo structs.

Field Summary

Modifier and TypeField and Description
private static final BGFXTextureInfo

Constructor Summary

AccessConstructor and Description
public
Buffer(ByteBuffer container)

Creates a new BGFXTextureInfo.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 byte

Returns:

the value of the BGFXTextureInfo#bitsPerPixel field.
bitsPerPixel
()

public boolean

Returns:

the value of the BGFXTextureInfo#cubeMap field.
cubeMap
()

public short

Returns:

the value of the BGFXTextureInfo#depth field.
depth
()

public int

Returns:

the value of the BGFXTextureInfo#format field.
format
()

protected BGFXTextureInfo
public short

Returns:

the value of the BGFXTextureInfo#height field.
height
()

public short

Returns:

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

public byte

Returns:

the value of the BGFXTextureInfo#numMips field.
numMips
()

protected BGFXTextureInfo.Buffer
public int

Returns:

the value of the BGFXTextureInfo#storageSize field.
storageSize
()

public short

Returns:

the value of the BGFXTextureInfo#width field.
width
()

Inherited from org.lwjgl.system.StructBuffer:
applyapplyforEachgetgetgetgetiteratorparallelStreamputputsizeofspliteratorstream

Field Detail

ELEMENT_FACTORYback to summary
private static final BGFXTextureInfo ELEMENT_FACTORY

Constructor Detail

Bufferback to summary
public Buffer(ByteBuffer container)

Creates a new BGFXTextureInfo.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 BGFXTextureInfo#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

bitsPerPixelback to summary
public byte bitsPerPixel()
Returns:byte

the value of the BGFXTextureInfo#bitsPerPixel field.

Annotations
@NativeType:uint8_t
cubeMapback to summary
public boolean cubeMap()
Returns:boolean

the value of the BGFXTextureInfo#cubeMap field.

Annotations
@NativeType:bool
depthback to summary
public short depth()
Returns:short

the value of the BGFXTextureInfo#depth field.

Annotations
@NativeType:uint16_t
formatback to summary
public int format()
Returns:int

the value of the BGFXTextureInfo#format field.

Annotations
@NativeType:bgfx_texture_format_t
getElementFactoryback to summary
protected BGFXTextureInfo getElementFactory()

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

Annotations
@Override
heightback to summary
public short height()
Returns:short

the value of the BGFXTextureInfo#height field.

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

the value of the BGFXTextureInfo#numLayers field.

Annotations
@NativeType:uint16_t
numMipsback to summary
public byte numMips()
Returns:byte

the value of the BGFXTextureInfo#numMips field.

Annotations
@NativeType:uint8_t
selfback to summary
protected BGFXTextureInfo.Buffer self()

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

Annotations
@Override
storageSizeback to summary
public int storageSize()
Returns:int

the value of the BGFXTextureInfo#storageSize field.

Annotations
@NativeType:uint32_t
widthback to summary
public short width()
Returns:short

the value of the BGFXTextureInfo#width field.

Annotations
@NativeType:uint16_t