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

public Class ktxTexture1

extends Struct<ktxTexture1>
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 1 format texture.

ktxTextures should be created only by one of the ktxTexture_Create* functions and these fields should be considered read-only.

Layout


struct ktxTexture1 {
    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 glFormat;
    ktx_uint32_t glInternalformat;
    ktx_uint32_t glBaseInternalformat;
    ktx_uint32_t glType;
    struct ktxTexture1_private * _private;
}

Nested and Inner Type Summary

Modifier and TypeClass and Description
public static class
ktxTexture1.Buffer

An array of ktxTexture1 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
GENERATEMIPMAPS

The struct member offsets.

public static final int
GLBASEINTERNALFORMAT

The struct member offsets.

public static final int
GLFORMAT

The struct member offsets.

public static final int
GLINTERNALFORMAT

The struct member offsets.

public static final int
GLTYPE

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
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
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
SIZEOF

The struct size in bytes.

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
ktxTexture1(long address, ByteBuffer container)

public
ktxTexture1(ByteBuffer container)

Creates a ktxTexture1 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 ktxTexture1
calloc()

Returns a new ktxTexture1 instance allocated with memCalloc.

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

Returns a new ktxTexture1.Buffer instance allocated with memCalloc.

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

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

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

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

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

Returns a new ktxTexture1 instance allocated with BufferUtils.

public static ktxTexture1
create(long address)

Returns a new ktxTexture1 instance for the specified memory address.

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

Returns a new ktxTexture1.Buffer instance allocated with BufferUtils.

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

Create a ktxTexture1.Buffer instance at the specified memory.

public static ktxTexture1
createSafe(long address)

Like create, but returns null if address is NULL.

public static ktxTexture1.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 boolean
generateMipmaps()

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

public int
glBaseInternalformat()

base format of the texture data, e.g., GL_RGB

public int
glFormat()

format of the texture data, e.g., GL_RGB

public int
glInternalformat()

internal format of the texture data, e.g., GL_RGB8

public int
glType()

type of the texture data, e.g, GL_UNSIGNED_BYTE

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 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 static ktxTexture1
malloc()

Returns a new ktxTexture1 instance allocated with memAlloc.

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

Returns a new ktxTexture1.Buffer instance allocated with memAlloc.

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

Returns a new ktxTexture1 instance allocated on the specified MemoryStack.

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

Returns a new ktxTexture1.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 boolean
ngenerateMipmaps(long struct)

Unsafe version of generateMipmaps.

public static int
nglBaseInternalformat(long struct)

Unsafe version of glBaseInternalformat.

public static int
nglFormat(long struct)

Unsafe version of glFormat.

public static int
nglInternalformat(long struct)

Unsafe version of glInternalformat.

public static int
nglType(long struct)

Unsafe version of glType.

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 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
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 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 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 int
sizeof()

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

Returns sizeof(struct).
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