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

public Class ktxVulkanDeviceInfo

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

Struct for passing information about the Vulkan device on which to create images to the texture image loading functions.

Avoids passing a large number of parameters to each loading function. Use of VulkanDeviceInfo_Create or VulkanDeviceInfo_Construct to populate this structure is highly recommended.


    ktxVulkanDeviceInfo vdi;
    ktxVulkanTexture texture;

    vdi = ktxVulkanDeviceInfo_create(physicalDevice,
                                     device,
                                     queue,
                                     cmdPool,
                                     &allocator);
    ktxLoadVkTextureN("texture_1.ktx", vdi, &texture, NULL, NULL);
    // ...
    ktxLoadVkTextureN("texture_n.ktx", vdi, &texture, NULL, NULL);
    ktxVulkanDeviceInfo_destroy(vdi);

Layout


struct ktxVulkanDeviceInfo {
    VkInstance instance;
    VkPhysicalDevice physicalDevice;
    VkDevice device;
    VkQueue queue;
    VkCommandBuffer cmdBuffer;
    VkCommandPool cmdPool;
    VkAllocationCallbacks const * pAllocator;
    VkPhysicalDeviceMemoryProperties deviceMemoryProperties;
    ktxVulkanFunctions vkFuncs;
}

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
CMDBUFFER

The struct member offsets.

public static final int
CMDPOOL

The struct member offsets.

public static final int
DEVICE

The struct member offsets.

public static final int
DEVICEMEMORYPROPERTIES

The struct member offsets.

public static final int
INSTANCE

The struct member offsets.

public static final int
PALLOCATOR

The struct member offsets.

public static final int
PHYSICALDEVICE

The struct member offsets.

public static final int
QUEUE

The struct member offsets.

public static final int
SIZEOF

The struct size in bytes.

public static final int
VKFUNCS

The struct member offsets.

Inherited from org.lwjgl.system.Struct:
containerDEFAULT_ALIGN_ASDEFAULT_PACK_ALIGNMENT

Constructor Summary

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

public
ktxVulkanDeviceInfo(ByteBuffer container)

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

Method Summary

Modifier and TypeMethod and Description
public static ktxVulkanDeviceInfo
calloc()

Returns a new ktxVulkanDeviceInfo instance allocated with memCalloc.

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

Returns a new ktxVulkanDeviceInfo.Buffer instance allocated with memCalloc.

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

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

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

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

public long
cmdBuffer()

handle of the cmdBuffer to use

public ktxVulkanDeviceInfo
cmdBuffer(VkCommandBuffer value)

Sets the specified value to the cmdBuffer field.

public long
cmdPool()

handle of the command pool from which to allocate the command buffer

public ktxVulkanDeviceInfo
cmdPool(long value)

Sets the specified value to the cmdPool field.

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

Returns a new ktxVulkanDeviceInfo instance allocated with BufferUtils.

public static ktxVulkanDeviceInfo
create(long address)

Returns a new ktxVulkanDeviceInfo instance for the specified memory address.

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

Returns a new ktxVulkanDeviceInfo.Buffer instance allocated with BufferUtils.

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

Create a ktxVulkanDeviceInfo.Buffer instance at the specified memory.

public static ktxVulkanDeviceInfo
createSafe(long address)

Like create, but returns null if address is NULL.

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

Like create, but returns null if address is NULL.

public long
device()

handle of the logical device

public ktxVulkanDeviceInfo
device(VkDevice value)

Sets the specified value to the device field.

public VkPhysicalDeviceMemoryProperties
deviceMemoryProperties()

memory properties of the Vulkan physical device

public ktxVulkanDeviceInfo
public long
instance()

instance used to communicate with vulkan

public ktxVulkanDeviceInfo
instance(VkInstance value)

Sets the specified value to the instance field.

public static ktxVulkanDeviceInfo
malloc()

Returns a new ktxVulkanDeviceInfo instance allocated with memAlloc.

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

Returns a new ktxVulkanDeviceInfo.Buffer instance allocated with memAlloc.

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

Returns a new ktxVulkanDeviceInfo instance allocated on the specified MemoryStack.

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

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

public static long
ncmdBuffer(long struct)

Unsafe version of cmdBuffer.

public static void
ncmdBuffer(long struct, VkCommandBuffer value)

Unsafe version of cmdBuffer.

public static long
ncmdPool(long struct)

Unsafe version of cmdPool.

public static void
ncmdPool(long struct, long value)

Unsafe version of cmdPool.

public static long
ndevice(long struct)

Unsafe version of device.

public static void
ndevice(long struct, VkDevice value)

Unsafe version of device.

public static VkPhysicalDeviceMemoryProperties
ndeviceMemoryProperties(long struct)

Unsafe version of deviceMemoryProperties.

public static void
public static long
ninstance(long struct)

Unsafe version of instance.

public static void
ninstance(long struct, VkInstance value)

Unsafe version of instance.

public static VkAllocationCallbacks
npAllocator(long struct)

Unsafe version of pAllocator.

public static void
npAllocator(long struct, VkAllocationCallbacks value)

Unsafe version of pAllocator.

public static long
nphysicalDevice(long struct)

Unsafe version of physicalDevice.

public static void
nphysicalDevice(long struct, VkPhysicalDevice value)

Unsafe version of physicalDevice.

public static long
nqueue(long struct)

Unsafe version of queue.

public static void
nqueue(long struct, VkQueue value)

Unsafe version of queue.

public static ktxVulkanFunctions
nvkFuncs(long struct)

Unsafe version of vkFuncs.

public static void
nvkFuncs(long struct, ktxVulkanFunctions value)

Unsafe version of vkFuncs.

public VkAllocationCallbacks
pAllocator()

pointer to the allocator to use for the command buffer and created images

public ktxVulkanDeviceInfo
pAllocator(VkAllocationCallbacks value)

Sets the address of the specified VkAllocationCallbacks to the pAllocator field.

public long
physicalDevice()

handle of the physical device

public ktxVulkanDeviceInfo
physicalDevice(VkPhysicalDevice value)

Sets the specified value to the physicalDevice field.

public long
queue()

handle to the queue to which to submit commands

public ktxVulkanDeviceInfo
queue(VkQueue value)

Sets the specified value to the queue field.

public ktxVulkanDeviceInfo
set(VkInstance instance, VkPhysicalDevice physicalDevice, VkDevice device, VkQueue queue, VkCommandBuffer cmdBuffer, long cmdPool, VkAllocationCallbacks pAllocator, VkPhysicalDeviceMemoryProperties deviceMemoryProperties, ktxVulkanFunctions vkFuncs)

Initializes this struct with the specified values.

public ktxVulkanDeviceInfo

Returns:

this struct
set
(ktxVulkanDeviceInfo
the source struct
src
)

Copies the specified struct data to this struct.

public int
sizeof()

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

Returns sizeof(struct).
public static void
validate(long
the struct to validate
struct
)

Validates pointer members that should not be NULL.

public ktxVulkanFunctions
vkFuncs()

the functions needed to operate functions

public ktxVulkanDeviceInfo
vkFuncs(ktxVulkanFunctions value)

Copies the specified ktxVulkanFunctions to the vkFuncs field.

public ktxVulkanDeviceInfo
vkFuncs(Consumer<ktxVulkanFunctions> consumer)

Passes the vkFuncs field to the specified Consumer.

Inherited from org.lwjgl.system.Struct:
__array__array__array__checkContainer__checkMalloc__create__getContainer__getContainer__member__member__member__padding__padding__struct__struct__union__unionclearfreeisNullvalidate