Package org.lwjgl.util.ktx
Class ktxTexture2
java.lang.Object
org.lwjgl.system.Pointer.Default
org.lwjgl.system.Struct<ktxTexture2>
org.lwjgl.util.ktx.ktxTexture2
- All Implemented Interfaces:
AutoCloseable,org.lwjgl.system.NativeResource,org.lwjgl.system.Pointer
public class ktxTexture2
extends org.lwjgl.system.Struct<ktxTexture2>
implements org.lwjgl.system.NativeResource
Class representing a KTX version 2 format texture.
ktxTextures should be created only by one of the ktxTexture_Create* functions and these fields should be considered read-only.
Layout
struct ktxTexture2 {
class_id classId();
struct ktxTexture_vtbl * vtbl();
struct ktxTexture_vvtbl * vvtbl();
struct ktxTexture_protected * _protected(int);
ktx_bool_t isArray();
ktx_bool_t isCubemap();
ktx_bool_t isCompressed();
ktx_bool_t generateMipmaps();
ktx_uint32_t baseWidth();
ktx_uint32_t baseHeight();
ktx_uint32_t baseDepth();
ktx_uint32_t numDimensions();
ktx_uint32_t numLevels();
ktx_uint32_t numLayers();
ktx_uint32_t numFaces();
struct ktxOrientation orientation();
ktxHashList kvDataHead();
ktx_uint32_t kvDataLen();
ktx_uint8_t * kvData();
ktx_size_t dataSize();
ktx_uint8_t * pData();
ktx_uint32_t vkFormat;
ktx_uint32_t * pDfd;
ktxSupercmpScheme supercompressionScheme;
ktx_bool_t isVideo;
ktx_uint32_t duration;
ktx_uint32_t timescale;
ktx_uint32_t loopcount;
struct ktxTexture2_private * _private;
}-
Nested Class Summary
Nested ClassesNested classes/interfaces inherited from class org.lwjgl.system.Struct
org.lwjgl.system.Struct.StructValidationNested classes/interfaces inherited from interface org.lwjgl.system.Pointer
org.lwjgl.system.Pointer.Default -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final intThe struct member offsets.static final intThe struct member offsets.static final intThe struct alignment in bytes.static final intThe struct member offsets.static final intThe struct member offsets.static final intThe struct member offsets.static final intThe struct member offsets.static final intThe struct member offsets.static final intThe struct member offsets.static final intThe struct member offsets.static final intThe struct member offsets.static final intThe struct member offsets.static final intThe struct member offsets.static final intThe struct member offsets.static final intThe struct member offsets.static final intThe struct member offsets.static final intThe struct member offsets.static final intThe struct member offsets.static final intThe struct member offsets.static final intThe struct member offsets.static final intThe struct member offsets.static final intThe struct member offsets.static final intThe struct member offsets.static final intThe struct member offsets.static final intThe struct member offsets.static final intThe struct size in bytes.static final intThe struct member offsets.static final intThe struct member offsets.static final intThe struct member offsets.static final intThe struct member offsets.static final intThe struct member offsets.Fields inherited from interface org.lwjgl.system.Pointer
BITS32, BITS64, CLONG_SHIFT, CLONG_SIZE, POINTER_SHIFT, POINTER_SIZE -
Constructor Summary
ConstructorsConstructorDescriptionktxTexture2(ByteBuffer container) Creates aktxTexture2instance at the current position of the specifiedByteBuffercontainer. -
Method Summary
Modifier and TypeMethodDescriptionorg.lwjgl.PointerBuffer_protected(int capacity) intdepth of the texture's base levelintheight of the texture's base levelintwidth of the texture's base levelstatic ktxTexture2calloc()Returns a newktxTexture2instance allocated withmemCalloc.static ktxTexture2.Buffercalloc(int capacity) Returns a newktxTexture2.Bufferinstance allocated withmemCalloc.static ktxTexture2.Buffercalloc(int capacity, org.lwjgl.system.MemoryStack stack) Returns a newktxTexture2.Bufferinstance allocated on the specifiedMemoryStackand initializes all its bits to zero.static ktxTexture2calloc(org.lwjgl.system.MemoryStack stack) Returns a newktxTexture2instance allocated on the specifiedMemoryStackand initializes all its bits to zero.intclassId()must be:KTX.ktxTexture2_cstatic ktxTexture2create()Returns a newktxTexture2instance allocated withBufferUtils.static ktxTexture2.Buffercreate(int capacity) Returns a newktxTexture2.Bufferinstance allocated withBufferUtils.static ktxTexture2create(long address) Returns a newktxTexture2instance for the specified memory address.static ktxTexture2.Buffercreate(long address, int capacity) Create aktxTexture2.Bufferinstance at the specified memory.static @Nullable ktxTexture2createSafe(long address) static @Nullable ktxTexture2.BuffercreateSafe(long address, int capacity) longdataSize()byte length of the texture's uncompressed image dataintduration()booleanbooleanisArray()TRUEif the texture is an array texture, i.e, aGL_TEXTURE*_ARRAYtarget is to be usedbooleanTRUEif the texture's format is a block compressed formatbooleanTRUEif the texture is a cubemap or cubemap arraybooleanisVideo()@Nullable ByteBufferkvData()pointer to the metadata, if it has been extracted in its raw form, otherwiseNULLlonghead of the hash list of metadataintlength of the metadata, if it has been extracted in its raw form, otherwise 0intstatic ktxTexture2malloc()Returns a newktxTexture2instance allocated withmemAlloc.static ktxTexture2.Buffermalloc(int capacity) Returns a newktxTexture2.Bufferinstance allocated withmemAlloc.static ktxTexture2.Buffermalloc(int capacity, org.lwjgl.system.MemoryStack stack) Returns a newktxTexture2.Bufferinstance allocated on the specifiedMemoryStack.static ktxTexture2malloc(org.lwjgl.system.MemoryStack stack) Returns a newktxTexture2instance allocated on the specifiedMemoryStack.static org.lwjgl.PointerBuffern_private(long struct, int capacity) static org.lwjgl.PointerBuffern_protected(long struct, int capacity) Unsafe version of_protected.static intnbaseDepth(long struct) Unsafe version ofbaseDepth().static intnbaseHeight(long struct) Unsafe version ofbaseHeight().static intnbaseWidth(long struct) Unsafe version ofbaseWidth().static intnclassId(long struct) Unsafe version ofclassId().static longndataSize(long struct) Unsafe version ofdataSize().static intnduration(long struct) Unsafe version ofduration().static booleanngenerateMipmaps(long struct) Unsafe version ofgenerateMipmaps().static booleannisArray(long struct) Unsafe version ofisArray().static booleannisCompressed(long struct) Unsafe version ofisCompressed().static booleannisCubemap(long struct) Unsafe version ofisCubemap().static booleannisVideo(long struct) Unsafe version ofisVideo().static @Nullable ByteBuffernkvData(long struct) Unsafe version ofkvData.static longnkvDataHead(long struct) Unsafe version ofkvDataHead().static intnkvDataLen(long struct) Unsafe version ofkvDataLen().static intnloopcount(long struct) Unsafe version ofloopcount().static intnnumDimensions(long struct) Unsafe version ofnumDimensions().static intnnumFaces(long struct) Unsafe version ofnumFaces().static intnnumLayers(long struct) Unsafe version ofnumLayers().static intnnumLevels(long struct) Unsafe version ofnumLevels().static ktxOrientationnorientation(long struct) Unsafe version oforientation().static ByteBuffernpData(long struct) Unsafe version ofpData.static @Nullable IntBuffernpDfd(long struct, int capacity) Unsafe version ofpDfd.static intnsupercompressionScheme(long struct) Unsafe version ofsupercompressionScheme().static intntimescale(long struct) Unsafe version oftimescale().intnumber of dimensions in the texture: 1, 2 or 3.intnumFaces()number of faces: 6 for cube maps, 1 otherwiseintnumber of array layers in the textureintnumber of mip levels in the texture.static intnvkFormat(long struct) Unsafe version ofvkFormat().static ktxTexture_vtblnvtbl(long struct) Unsafe version ofvtbl().static longnvvtbl(long struct) Unsafe version ofvvtbl().describes the logical orientation of the images in each dimensionpData()pointer to the start of the image data@Nullable IntBufferpDfd(int capacity) intsizeof()intintintvkFormat()vtbl()pointer to the class's vtblelongvvtbl()pointer to the class's vtble for Vulkan functionsMethods inherited from class org.lwjgl.system.Struct
clear, free, isNull, validate, validateMethods inherited from class org.lwjgl.system.Pointer.Default
address, equals, hashCode, toStringMethods 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. -
CLASSID
public static final int CLASSIDThe struct member offsets. -
VTBL
public static final int VTBLThe struct member offsets. -
VVTBL
public static final int VVTBLThe struct member offsets. -
_PROTECTED
public static final int _PROTECTEDThe struct member offsets. -
ISARRAY
public static final int ISARRAYThe struct member offsets. -
ISCUBEMAP
public static final int ISCUBEMAPThe struct member offsets. -
ISCOMPRESSED
public static final int ISCOMPRESSEDThe struct member offsets. -
GENERATEMIPMAPS
public static final int GENERATEMIPMAPSThe struct member offsets. -
BASEWIDTH
public static final int BASEWIDTHThe struct member offsets. -
BASEHEIGHT
public static final int BASEHEIGHTThe struct member offsets. -
BASEDEPTH
public static final int BASEDEPTHThe struct member offsets. -
NUMDIMENSIONS
public static final int NUMDIMENSIONSThe struct member offsets. -
NUMLEVELS
public static final int NUMLEVELSThe struct member offsets. -
NUMLAYERS
public static final int NUMLAYERSThe struct member offsets. -
NUMFACES
public static final int NUMFACESThe struct member offsets. -
ORIENTATION
public static final int ORIENTATIONThe struct member offsets. -
KVDATAHEAD
public static final int KVDATAHEADThe struct member offsets. -
KVDATALEN
public static final int KVDATALENThe struct member offsets. -
KVDATA
public static final int KVDATAThe struct member offsets. -
DATASIZE
public static final int DATASIZEThe struct member offsets. -
PDATA
public static final int PDATAThe struct member offsets. -
VKFORMAT
public static final int VKFORMATThe struct member offsets. -
PDFD
public static final int PDFDThe struct member offsets. -
SUPERCOMPRESSIONSCHEME
public static final int SUPERCOMPRESSIONSCHEMEThe struct member offsets. -
ISVIDEO
public static final int ISVIDEOThe struct member offsets. -
DURATION
public static final int DURATIONThe struct member offsets. -
TIMESCALE
public static final int TIMESCALEThe struct member offsets. -
LOOPCOUNT
public static final int LOOPCOUNTThe struct member offsets. -
_PRIVATE
public static final int _PRIVATEThe struct member offsets.
-
-
Constructor Details
-
ktxTexture2
Creates aktxTexture2instance at the current position of the specifiedByteBuffercontainer. 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()- Specified by:
sizeofin classorg.lwjgl.system.Struct<ktxTexture2>
-
classId
public int classId()must be:KTX.ktxTexture2_c -
vtbl
pointer to the class's vtble -
vvtbl
public long vvtbl()pointer to the class's vtble for Vulkan functions -
_protected
public org.lwjgl.PointerBuffer _protected(int capacity) - Parameters:
capacity- the number of elements in the returned buffer- Returns:
- opaque pointer to the class's protected variables
-
isArray
public boolean isArray()TRUEif the texture is an array texture, i.e, aGL_TEXTURE*_ARRAYtarget is to be used -
isCubemap
public boolean isCubemap()TRUEif the texture is a cubemap or cubemap array -
isCompressed
public boolean isCompressed()TRUEif the texture's format is a block compressed format -
generateMipmaps
public boolean generateMipmaps() -
baseWidth
public int baseWidth()width of the texture's base level -
baseHeight
public int baseHeight()height of the texture's base level -
baseDepth
public int baseDepth()depth of the texture's base level -
numDimensions
public int numDimensions()number of dimensions in the texture: 1, 2 or 3. -
numLevels
public int numLevels()number of mip levels in the texture.Must be 1, if
generateMipmapsisTRUE. Can be less than a full pyramid but always starts at the base level. -
numLayers
public int numLayers()number of array layers in the texture -
numFaces
public int numFaces()number of faces: 6 for cube maps, 1 otherwise -
orientation
describes the logical orientation of the images in each dimension -
kvDataHead
public long kvDataHead()head of the hash list of metadata -
kvDataLen
public int kvDataLen()length of the metadata, if it has been extracted in its raw form, otherwise 0 -
kvData
pointer to the metadata, if it has been extracted in its raw form, otherwiseNULL -
dataSize
public long dataSize()byte length of the texture's uncompressed image data -
pData
pointer to the start of the image data -
vkFormat
public int vkFormat()- Returns:
- the value of the
vkFormatfield.
-
pDfd
- Parameters:
capacity- the number of elements in the returned buffer- Returns:
- a
IntBufferview of the data pointed to by thepDfdfield.
-
supercompressionScheme
public int supercompressionScheme()- Returns:
- the value of the
supercompressionSchemefield.
-
isVideo
public boolean isVideo()- Returns:
- the value of the
isVideofield.
-
duration
public int duration()- Returns:
- the value of the
durationfield.
-
timescale
public int timescale()- Returns:
- the value of the
timescalefield.
-
loopcount
public int loopcount()- Returns:
- the value of the
loopcountfield.
-
malloc
Returns a newktxTexture2instance allocated withmemAlloc. The instance must be explicitly freed. -
calloc
Returns a newktxTexture2instance allocated withmemCalloc. The instance must be explicitly freed. -
create
Returns a newktxTexture2instance allocated withBufferUtils. -
create
Returns a newktxTexture2instance for the specified memory address. -
createSafe
-
malloc
Returns a newktxTexture2.Bufferinstance allocated withmemAlloc. The instance must be explicitly freed.- Parameters:
capacity- the buffer capacity
-
calloc
Returns a newktxTexture2.Bufferinstance allocated withmemCalloc. The instance must be explicitly freed.- Parameters:
capacity- the buffer capacity
-
create
Returns a newktxTexture2.Bufferinstance allocated withBufferUtils.- Parameters:
capacity- the buffer capacity
-
create
Create aktxTexture2.Bufferinstance at the specified memory.- Parameters:
address- the memory addresscapacity- the buffer capacity
-
createSafe
-
malloc
Returns a newktxTexture2instance allocated on the specifiedMemoryStack.- Parameters:
stack- the stack from which to allocate
-
calloc
Returns a newktxTexture2instance allocated on the specifiedMemoryStackand initializes all its bits to zero.- Parameters:
stack- the stack from which to allocate
-
malloc
Returns a newktxTexture2.Bufferinstance allocated on the specifiedMemoryStack.- Parameters:
capacity- the buffer capacitystack- the stack from which to allocate
-
calloc
Returns a newktxTexture2.Bufferinstance allocated on the specifiedMemoryStackand initializes all its bits to zero.- Parameters:
capacity- the buffer capacitystack- the stack from which to allocate
-
nclassId
public static int nclassId(long struct) Unsafe version ofclassId(). -
nvtbl
Unsafe version ofvtbl(). -
nvvtbl
public static long nvvtbl(long struct) Unsafe version ofvvtbl(). -
n_protected
public static org.lwjgl.PointerBuffer n_protected(long struct, int capacity) Unsafe version of_protected. -
nisArray
public static boolean nisArray(long struct) Unsafe version ofisArray(). -
nisCubemap
public static boolean nisCubemap(long struct) Unsafe version ofisCubemap(). -
nisCompressed
public static boolean nisCompressed(long struct) Unsafe version ofisCompressed(). -
ngenerateMipmaps
public static boolean ngenerateMipmaps(long struct) Unsafe version ofgenerateMipmaps(). -
nbaseWidth
public static int nbaseWidth(long struct) Unsafe version ofbaseWidth(). -
nbaseHeight
public static int nbaseHeight(long struct) Unsafe version ofbaseHeight(). -
nbaseDepth
public static int nbaseDepth(long struct) Unsafe version ofbaseDepth(). -
nnumDimensions
public static int nnumDimensions(long struct) Unsafe version ofnumDimensions(). -
nnumLevels
public static int nnumLevels(long struct) Unsafe version ofnumLevels(). -
nnumLayers
public static int nnumLayers(long struct) Unsafe version ofnumLayers(). -
nnumFaces
public static int nnumFaces(long struct) Unsafe version ofnumFaces(). -
norientation
Unsafe version oforientation(). -
nkvDataHead
public static long nkvDataHead(long struct) Unsafe version ofkvDataHead(). -
nkvDataLen
public static int nkvDataLen(long struct) Unsafe version ofkvDataLen(). -
nkvData
Unsafe version ofkvData. -
ndataSize
public static long ndataSize(long struct) Unsafe version ofdataSize(). -
npData
Unsafe version ofpData. -
nvkFormat
public static int nvkFormat(long struct) Unsafe version ofvkFormat(). -
npDfd
Unsafe version ofpDfd. -
nsupercompressionScheme
public static int nsupercompressionScheme(long struct) Unsafe version ofsupercompressionScheme(). -
nisVideo
public static boolean nisVideo(long struct) Unsafe version ofisVideo(). -
nduration
public static int nduration(long struct) Unsafe version ofduration(). -
ntimescale
public static int ntimescale(long struct) Unsafe version oftimescale(). -
nloopcount
public static int nloopcount(long struct) Unsafe version ofloopcount(). -
n_private
public static org.lwjgl.PointerBuffer n_private(long struct, int capacity)
-