Top Description Inners Fields Constructors Methods
org.lwjgl.util.ktx

public Class ktxTexture2

extends Struct<ktxTexture2>
implements NativeResource
Class Inheritance
All Implemented Interfaces
org.lwjgl.system.NativeResource, java.lang.AutoCloseable
Imports
javax.annotation.*, java.nio.*, org.lwjgl.*, org.lwjgl.system.*

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

Modifier and TypeClass and Description
public static class
ktxTexture2.Buffer

An array of ktxTexture2 structs.

Field Summary

Modifier and TypeField and Description
public static final int
_PRIVATE

The struct member offsets.

public static final int
_PROTECTED

The struct member offsets.

public static final int
ALIGNOF

The struct alignment in bytes.

public static final int
BASEDEPTH

The struct member offsets.

public static final int
BASEHEIGHT

The struct member offsets.

public static final int
BASEWIDTH

The struct member offsets.

public static final int
CLASSID

The struct member offsets.

public static final int
DATASIZE

The struct member offsets.

public static final int
DURATION

The struct member offsets.

public static final int
GENERATEMIPMAPS

The struct member offsets.

public static final int
ISARRAY

The struct member offsets.

public static final int
ISCOMPRESSED

The struct member offsets.

public static final int
ISCUBEMAP

The struct member offsets.

public static final int
ISVIDEO

The struct member offsets.

public static final int
KVDATA

The struct member offsets.

public static final int
KVDATAHEAD

The struct member offsets.

public static final int
KVDATALEN

The struct member offsets.

public static final int
LOOPCOUNT

The struct member offsets.

public static final int
NUMDIMENSIONS

The struct member offsets.

public static final int
NUMFACES

The struct member offsets.

public static final int
NUMLAYERS

The struct member offsets.

public static final int
NUMLEVELS

The struct member offsets.

public static final int
ORIENTATION

The struct member offsets.

public static final int
PDATA

The struct member offsets.

public static final int
PDFD

The struct member offsets.

public static final int
SIZEOF

The struct size in bytes.

public static final int
SUPERCOMPRESSIONSCHEME

The struct member offsets.

public static final int
TIMESCALE

The struct member offsets.

public static final int
VKFORMAT

The struct member offsets.

public static final int
VTBL

The struct member offsets.

public static final int
VVTBL

The struct member offsets.

Inherited from org.lwjgl.system.Struct:
containerDEFAULT_ALIGN_ASDEFAULT_PACK_ALIGNMENT

Constructor Summary

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

public
ktxTexture2(ByteBuffer container)

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

Method Summary

Modifier and TypeMethod and Description
public PointerBuffer

Returns:

opaque pointer to the class's protected variables
_protected
(int
the number of elements in the returned buffer
capacity
)

public int
baseDepth()

depth of the texture's base level

public int
baseHeight()

height of the texture's base level

public int
baseWidth()

width of the texture's base level

public static ktxTexture2
calloc()

Returns a new ktxTexture2 instance allocated with memCalloc.

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

Returns a new ktxTexture2.Buffer instance allocated with memCalloc.

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

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

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

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

public int
protected ktxTexture2
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 ktxTexture2
create()

Returns a new ktxTexture2 instance allocated with BufferUtils.

public static ktxTexture2
create(long address)

Returns a new ktxTexture2 instance for the specified memory address.

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

Returns a new ktxTexture2.Buffer instance allocated with BufferUtils.

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

Create a ktxTexture2.Buffer instance at the specified memory.

public static ktxTexture2
createSafe(long address)

Like create, but returns null if address is NULL.

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

Like create, but returns null if address is NULL.

public long
dataSize()

byte length of the texture's uncompressed image data

public int

Returns:

the value of the duration field.
duration
()

public boolean
generateMipmaps()

TRUE if mipmaps should be generated for the texture by Texture_GLUpload or Texture_VkUpload

public boolean
isArray()

TRUE if the texture is an array texture, i.e, a GL_TEXTURE*_ARRAY target is to be used

public boolean
isCompressed()

TRUE if the texture's format is a block compressed format

public boolean
isCubemap()

TRUE if the texture is a cubemap or cubemap array

public boolean

Returns:

the value of the isVideo field.
isVideo
()

public ByteBuffer
kvData()

pointer to the metadata, if it has been extracted in its raw form, otherwise NULL

public long
kvDataHead()

head of the hash list of metadata

public int
kvDataLen()

length of the metadata, if it has been extracted in its raw form, otherwise 0

public int

Returns:

the value of the loopcount field.
loopcount
()

public static ktxTexture2
malloc()

Returns a new ktxTexture2 instance allocated with memAlloc.

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

Returns a new ktxTexture2.Buffer instance allocated with memAlloc.

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

Returns a new ktxTexture2 instance allocated on the specified MemoryStack.

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

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

public static PointerBuffer
n_private(long struct, int capacity)

public static PointerBuffer
n_protected(long struct, int capacity)

Unsafe version of _protected.

public static int
nbaseDepth(long struct)

Unsafe version of baseDepth.

public static int
nbaseHeight(long struct)

Unsafe version of baseHeight.

public static int
nbaseWidth(long struct)

Unsafe version of baseWidth.

public static int
nclassId(long struct)

Unsafe version of classId.

public static long
ndataSize(long struct)

Unsafe version of dataSize.

public static int
nduration(long struct)

Unsafe version of duration.

public static boolean
ngenerateMipmaps(long struct)

Unsafe version of generateMipmaps.

public static boolean
nisArray(long struct)

Unsafe version of isArray.

public static boolean
nisCompressed(long struct)

Unsafe version of isCompressed.

public static boolean
nisCubemap(long struct)

Unsafe version of isCubemap.

public static boolean
nisVideo(long struct)

Unsafe version of isVideo.

public static ByteBuffer
nkvData(long struct)

Unsafe version of kvData.

public static long
nkvDataHead(long struct)

Unsafe version of kvDataHead.

public static int
nkvDataLen(long struct)

Unsafe version of kvDataLen.

public static int
nloopcount(long struct)

Unsafe version of loopcount.

public static int
nnumDimensions(long struct)

Unsafe version of numDimensions.

public static int
nnumFaces(long struct)

Unsafe version of numFaces.

public static int
nnumLayers(long struct)

Unsafe version of numLayers.

public static int
nnumLevels(long struct)

Unsafe version of numLevels.

public static ktxOrientation
norientation(long struct)

Unsafe version of orientation.

public static ByteBuffer
npData(long struct)

Unsafe version of pData.

public static IntBuffer
npDfd(long struct, int capacity)

Unsafe version of pDfd.

public static int
nsupercompressionScheme(long struct)

Unsafe version of supercompressionScheme.

public static int
ntimescale(long struct)

Unsafe version of timescale.

public int
numDimensions()

number of dimensions in the texture: 1, 2 or 3.

public int
numFaces()

number of faces: 6 for cube maps, 1 otherwise

public int
numLayers()

number of array layers in the texture

public int
numLevels()

number of mip levels in the texture.

public static int
nvkFormat(long struct)

Unsafe version of vkFormat.

public static ktxTexture_vtbl
nvtbl(long struct)

Unsafe version of vtbl.

public static long
nvvtbl(long struct)

Unsafe version of vvtbl.

public ktxOrientation
orientation()

describes the logical orientation of the images in each dimension

public ByteBuffer
pData()

pointer to the start of the image data

public IntBuffer

Returns:

a IntBuffer view of the data pointed to by the pDfd field.
pDfd
(int
the number of elements in the returned buffer
capacity
)

public int
sizeof()

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

Returns sizeof(struct).
public int

Returns:

the value of the supercompressionScheme field.
supercompressionScheme
()

public int

Returns:

the value of the timescale field.
timescale
()

public int

Returns:

the value of the vkFormat field.
vkFormat
()

public ktxTexture_vtbl
vtbl()

pointer to the class's vtble

public long
vvtbl()

pointer to the class's vtble for Vulkan functions

Inherited from org.lwjgl.system.Struct:
__array__array__array__checkContainer__checkMalloc__create__getContainer__getContainer__member__member__member__padding__padding__struct__struct__union__unionclearfreeisNullvalidate