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

public Class ktxVulkanTexture

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

Struct for returning information about the Vulkan texture image created by the ktxTexture_VkUpload* functions.

Creation of these objects is internal to the upload functions.

Layout


struct ktxVulkanTexture {
    PFN_vkDestroyImage vkDestroyImage;
    PFN_vkFreeMemory vkFreeMemory;
    VkImage image;
    VkFormat imageFormat;
    VkImageLayout imageLayout;
    VkDeviceMemory deviceMemory;
    VkImageViewType viewType;
    uint32_t width;
    uint32_t height;
    uint32_t depth;
    uint32_t levelCount;
    uint32_t layerCount;
}

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
DEPTH

The struct member offsets.

public static final int
DEVICEMEMORY

The struct member offsets.

public static final int
HEIGHT

The struct member offsets.

public static final int
IMAGE

The struct member offsets.

public static final int
IMAGEFORMAT

The struct member offsets.

public static final int
IMAGELAYOUT

The struct member offsets.

public static final int
LAYERCOUNT

The struct member offsets.

public static final int
LEVELCOUNT

The struct member offsets.

public static final int
SIZEOF

The struct size in bytes.

public static final int
VIEWTYPE

The struct member offsets.

public static final int
VKDESTROYIMAGE

The struct member offsets.

public static final int
VKFREEMEMORY

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

public
ktxVulkanTexture(ByteBuffer container)

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

Method Summary

Modifier and TypeMethod and Description
public static ktxVulkanTexture
calloc()

Returns a new ktxVulkanTexture instance allocated with memCalloc.

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

Returns a new ktxVulkanTexture.Buffer instance allocated with memCalloc.

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

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

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

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

protected ktxVulkanTexture
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 ktxVulkanTexture
create()

Returns a new ktxVulkanTexture instance allocated with BufferUtils.

public static ktxVulkanTexture
create(long address)

Returns a new ktxVulkanTexture instance for the specified memory address.

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

Returns a new ktxVulkanTexture.Buffer instance allocated with BufferUtils.

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

Create a ktxVulkanTexture.Buffer instance at the specified memory.

public static ktxVulkanTexture
createSafe(long address)

Like create, but returns null if address is NULL.

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

Like create, but returns null if address is NULL.

public int
depth()

the depth of the image

public long
deviceMemory()

the memory allocated for the image on the Vulkan device

public int
height()

the height of the image

public long
image()

handle to the Vulkan image created by the loader

public int
imageFormat()

format of the image data

public int
imageLayout()

layout of the created image.

public int
layerCount()

the number of array layers in the image

public int
levelCount()

the number of MIP levels in the image

public static ktxVulkanTexture
malloc()

Returns a new ktxVulkanTexture instance allocated with memAlloc.

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

Returns a new ktxVulkanTexture.Buffer instance allocated with memAlloc.

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

Returns a new ktxVulkanTexture instance allocated on the specified MemoryStack.

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

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

public static int
ndepth(long struct)

Unsafe version of depth.

public static long
ndeviceMemory(long struct)

Unsafe version of deviceMemory.

public static int
nheight(long struct)

Unsafe version of height.

public static long
nimage(long struct)

Unsafe version of image.

public static int
nimageFormat(long struct)

Unsafe version of imageFormat.

public static int
nimageLayout(long struct)

Unsafe version of imageLayout.

public static int
nlayerCount(long struct)

Unsafe version of layerCount.

public static int
nlevelCount(long struct)

Unsafe version of levelCount.

public static int
nviewType(long struct)

Unsafe version of viewType.

public static long
nvkDestroyImage(long struct)

Unsafe version of vkDestroyImage.

public static long
nvkFreeMemory(long struct)

Unsafe version of vkFreeMemory.

public static int
nwidth(long struct)

Unsafe version of width.

public int
sizeof()

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

Returns sizeof(struct).
public int
viewType()

viewType corresponding to image.

public long
vkDestroyImage()

pointer to vkDestroyImage function

public long
vkFreeMemory()

pointer to vkFreeMemory function

public int
width()

the width of the image

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.

DEPTHback to summary
public static final int DEPTH

The struct member offsets.

DEVICEMEMORYback to summary
public static final int DEVICEMEMORY

The struct member offsets.

HEIGHTback to summary
public static final int HEIGHT

The struct member offsets.

IMAGEback to summary
public static final int IMAGE

The struct member offsets.

IMAGEFORMATback to summary
public static final int IMAGEFORMAT

The struct member offsets.

IMAGELAYOUTback to summary
public static final int IMAGELAYOUT

The struct member offsets.

LAYERCOUNTback to summary
public static final int LAYERCOUNT

The struct member offsets.

LEVELCOUNTback to summary
public static final int LEVELCOUNT

The struct member offsets.

SIZEOFback to summary
public static final int SIZEOF

The struct size in bytes.

VIEWTYPEback to summary
public static final int VIEWTYPE

The struct member offsets.

VKDESTROYIMAGEback to summary
public static final int VKDESTROYIMAGE

The struct member offsets.

VKFREEMEMORYback to summary
public static final int VKFREEMEMORY

The struct member offsets.

WIDTHback to summary
public static final int WIDTH

The struct member offsets.

Constructor Detail

ktxVulkanTextureback to summary
protected ktxVulkanTexture(long address, ByteBuffer container)
ktxVulkanTextureback to summary
public ktxVulkanTexture(ByteBuffer container)

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

callocback to summary
public static ktxVulkanTexture calloc()

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

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

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

Parameters
capacity:int

the buffer capacity

callocback to summary
public static ktxVulkanTexture calloc(MemoryStack stack)

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

Returns a new ktxVulkanTexture.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

createback to summary
protected ktxVulkanTexture 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 ktxVulkanTexture create()

Returns a new ktxVulkanTexture instance allocated with BufferUtils.

createback to summary
public static ktxVulkanTexture create(long address)

Returns a new ktxVulkanTexture instance for the specified memory address.

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

Returns a new ktxVulkanTexture.Buffer instance allocated with BufferUtils.

Parameters
capacity:int

the buffer capacity

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

Create a ktxVulkanTexture.Buffer instance at the specified memory.

Parameters
address:long

the memory address

capacity:int

the buffer capacity

createSafeback to summary
public static ktxVulkanTexture createSafe(long address)

Like create, but returns null if address is NULL.

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

Like create, but returns null if address is NULL.

Annotations
@Nullable
depthback to summary
public int depth()

the depth of the image

Annotations
@NativeType:uint32_t
deviceMemoryback to summary
public long deviceMemory()

the memory allocated for the image on the Vulkan device

Annotations
@NativeType:VkDeviceMemory
heightback to summary
public int height()

the height of the image

Annotations
@NativeType:uint32_t
imageback to summary
public long image()

handle to the Vulkan image created by the loader

Annotations
@NativeType:VkImage
imageFormatback to summary
public int imageFormat()

format of the image data

Annotations
@NativeType:VkFormat
imageLayoutback to summary
public int imageLayout()

layout of the created image. Has the same value as layout parameter passed to the loader.

Annotations
@NativeType:VkImageLayout
layerCountback to summary
public int layerCount()

the number of array layers in the image

Annotations
@NativeType:uint32_t
levelCountback to summary
public int levelCount()

the number of MIP levels in the image

Annotations
@NativeType:uint32_t
mallocback to summary
public static ktxVulkanTexture malloc()

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

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

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

Parameters
capacity:int

the buffer capacity

mallocback to summary
public static ktxVulkanTexture malloc(MemoryStack stack)

Returns a new ktxVulkanTexture instance allocated on the specified MemoryStack.

Parameters
stack:MemoryStack

the stack from which to allocate

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

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

Parameters
capacity:int

the buffer capacity

stack:MemoryStack

the stack from which to allocate

ndepthback to summary
public static int ndepth(long struct)

Unsafe version of depth.

ndeviceMemoryback to summary
public static long ndeviceMemory(long struct)

Unsafe version of deviceMemory.

nheightback to summary
public static int nheight(long struct)

Unsafe version of height.

nimageback to summary
public static long nimage(long struct)

Unsafe version of image.

nimageFormatback to summary
public static int nimageFormat(long struct)

Unsafe version of imageFormat.

nimageLayoutback to summary
public static int nimageLayout(long struct)

Unsafe version of imageLayout.

nlayerCountback to summary
public static int nlayerCount(long struct)

Unsafe version of layerCount.

nlevelCountback to summary
public static int nlevelCount(long struct)

Unsafe version of levelCount.

nviewTypeback to summary
public static int nviewType(long struct)

Unsafe version of viewType.

nvkDestroyImageback to summary
public static long nvkDestroyImage(long struct)

Unsafe version of vkDestroyImage.

nvkFreeMemoryback to summary
public static long nvkFreeMemory(long struct)

Unsafe version of vkFreeMemory.

nwidthback to summary
public static int 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
viewTypeback to summary
public int viewType()

viewType corresponding to image. Reflects the dimensionality, cubeness and arrayness of the image.

Annotations
@NativeType:VkImageViewType
vkDestroyImageback to summary
public long vkDestroyImage()

pointer to vkDestroyImage function

Annotations
@NativeType:PFN_vkDestroyImage
vkFreeMemoryback to summary
public long vkFreeMemory()

pointer to vkFreeMemory function

Annotations
@NativeType:PFN_vkFreeMemory
widthback to summary
public int width()

the width of the image

Annotations
@NativeType:uint32_t
org.lwjgl.util.ktx back to summary

public Class ktxVulkanTexture.Buffer

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

An array of ktxVulkanTexture structs.

Field Summary

Modifier and TypeField and Description
private static final ktxVulkanTexture

Constructor Summary

AccessConstructor and Description
public
Buffer(ByteBuffer container)

Creates a new ktxVulkanTexture.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 int

Returns:

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

public long

Returns:

the value of the ktxVulkanTexture#deviceMemory field.
deviceMemory
()

protected ktxVulkanTexture
public int

Returns:

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

public long

Returns:

the value of the ktxVulkanTexture#image field.
image
()

public int

Returns:

the value of the ktxVulkanTexture#imageFormat field.
imageFormat
()

public int

Returns:

the value of the ktxVulkanTexture#imageLayout field.
imageLayout
()

public int

Returns:

the value of the ktxVulkanTexture#layerCount field.
layerCount
()

public int

Returns:

the value of the ktxVulkanTexture#levelCount field.
levelCount
()

protected ktxVulkanTexture.Buffer
public int

Returns:

the value of the ktxVulkanTexture#viewType field.
viewType
()

public long

Returns:

the value of the ktxVulkanTexture#vkDestroyImage field.
vkDestroyImage
()

public long

Returns:

the value of the ktxVulkanTexture#vkFreeMemory field.
vkFreeMemory
()

public int

Returns:

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

Inherited from org.lwjgl.system.StructBuffer:
applyapplyforEachgetgetgetgetiteratorparallelStreamputputsizeofspliteratorstream

Field Detail

ELEMENT_FACTORYback to summary
private static final ktxVulkanTexture ELEMENT_FACTORY

Constructor Detail

Bufferback to summary
public Buffer(ByteBuffer container)

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

depthback to summary
public int depth()
Returns:int

the value of the ktxVulkanTexture#depth field.

Annotations
@NativeType:uint32_t
deviceMemoryback to summary
public long deviceMemory()
Returns:long

the value of the ktxVulkanTexture#deviceMemory field.

Annotations
@NativeType:VkDeviceMemory
getElementFactoryback to summary
protected ktxVulkanTexture getElementFactory()

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

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

the value of the ktxVulkanTexture#height field.

Annotations
@NativeType:uint32_t
imageback to summary
public long image()
Returns:long

the value of the ktxVulkanTexture#image field.

Annotations
@NativeType:VkImage
imageFormatback to summary
public int imageFormat()
Returns:int

the value of the ktxVulkanTexture#imageFormat field.

Annotations
@NativeType:VkFormat
imageLayoutback to summary
public int imageLayout()
Returns:int

the value of the ktxVulkanTexture#imageLayout field.

Annotations
@NativeType:VkImageLayout
layerCountback to summary
public int layerCount()
Returns:int

the value of the ktxVulkanTexture#layerCount field.

Annotations
@NativeType:uint32_t
levelCountback to summary
public int levelCount()
Returns:int

the value of the ktxVulkanTexture#levelCount field.

Annotations
@NativeType:uint32_t
selfback to summary
protected ktxVulkanTexture.Buffer self()

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

Annotations
@Override
viewTypeback to summary
public int viewType()
Returns:int

the value of the ktxVulkanTexture#viewType field.

Annotations
@NativeType:VkImageViewType
vkDestroyImageback to summary
public long vkDestroyImage()
Returns:long

the value of the ktxVulkanTexture#vkDestroyImage field.

Annotations
@NativeType:PFN_vkDestroyImage
vkFreeMemoryback to summary
public long vkFreeMemory()
Returns:long

the value of the ktxVulkanTexture#vkFreeMemory field.

Annotations
@NativeType:PFN_vkFreeMemory
widthback to summary
public int width()
Returns:int

the value of the ktxVulkanTexture#width field.

Annotations
@NativeType:uint32_t