Package org.lwjgl.util.ktx
Class ktxVulkanDeviceInfo
java.lang.Object
org.lwjgl.system.Pointer.Default
org.lwjgl.system.Struct<ktxVulkanDeviceInfo>
org.lwjgl.util.ktx.ktxVulkanDeviceInfo
- All Implemented Interfaces:
AutoCloseable,org.lwjgl.system.NativeResource,org.lwjgl.system.Pointer
public class ktxVulkanDeviceInfo
extends org.lwjgl.system.Struct<ktxVulkanDeviceInfo>
implements org.lwjgl.system.NativeResource
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 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 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 size in bytes.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
ConstructorsConstructorDescriptionktxVulkanDeviceInfo(ByteBuffer container) Creates aktxVulkanDeviceInfoinstance at the current position of the specifiedByteBuffercontainer. -
Method Summary
Modifier and TypeMethodDescriptionstatic ktxVulkanDeviceInfocalloc()Returns a newktxVulkanDeviceInfoinstance allocated withmemCalloc.static ktxVulkanDeviceInfo.Buffercalloc(int capacity) Returns a newktxVulkanDeviceInfo.Bufferinstance allocated withmemCalloc.static ktxVulkanDeviceInfo.Buffercalloc(int capacity, org.lwjgl.system.MemoryStack stack) Returns a newktxVulkanDeviceInfo.Bufferinstance allocated on the specifiedMemoryStackand initializes all its bits to zero.static ktxVulkanDeviceInfocalloc(org.lwjgl.system.MemoryStack stack) Returns a newktxVulkanDeviceInfoinstance allocated on the specifiedMemoryStackand initializes all its bits to zero.longhandle of the cmdBuffer to usecmdBuffer(org.lwjgl.vulkan.VkCommandBuffer value) Sets the specified value to thecmdBuffer()field.longcmdPool()handle of the command pool from which to allocate the command buffercmdPool(long value) Sets the specified value to thecmdPool()field.static ktxVulkanDeviceInfocreate()Returns a newktxVulkanDeviceInfoinstance allocated withBufferUtils.static ktxVulkanDeviceInfo.Buffercreate(int capacity) Returns a newktxVulkanDeviceInfo.Bufferinstance allocated withBufferUtils.static ktxVulkanDeviceInfocreate(long address) Returns a newktxVulkanDeviceInfoinstance for the specified memory address.static ktxVulkanDeviceInfo.Buffercreate(long address, int capacity) Create aktxVulkanDeviceInfo.Bufferinstance at the specified memory.static @Nullable ktxVulkanDeviceInfocreateSafe(long address) static @Nullable ktxVulkanDeviceInfo.BuffercreateSafe(long address, int capacity) longdevice()handle of the logical devicedevice(org.lwjgl.vulkan.VkDevice value) Sets the specified value to thedevice()field.org.lwjgl.vulkan.VkPhysicalDeviceMemoryPropertiesmemory properties of the Vulkan physical devicedeviceMemoryProperties(org.lwjgl.vulkan.VkPhysicalDeviceMemoryProperties value) Copies the specifiedVkPhysicalDeviceMemoryPropertiesto thedeviceMemoryProperties()field.longinstance()instance used to communicate with vulkaninstance(org.lwjgl.vulkan.VkInstance value) Sets the specified value to theinstance()field.static ktxVulkanDeviceInfomalloc()Returns a newktxVulkanDeviceInfoinstance allocated withmemAlloc.static ktxVulkanDeviceInfo.Buffermalloc(int capacity) Returns a newktxVulkanDeviceInfo.Bufferinstance allocated withmemAlloc.static ktxVulkanDeviceInfo.Buffermalloc(int capacity, org.lwjgl.system.MemoryStack stack) Returns a newktxVulkanDeviceInfo.Bufferinstance allocated on the specifiedMemoryStack.static ktxVulkanDeviceInfomalloc(org.lwjgl.system.MemoryStack stack) Returns a newktxVulkanDeviceInfoinstance allocated on the specifiedMemoryStack.static longncmdBuffer(long struct) Unsafe version ofcmdBuffer().static voidncmdBuffer(long struct, org.lwjgl.vulkan.VkCommandBuffer value) Unsafe version ofcmdBuffer.static longncmdPool(long struct) Unsafe version ofcmdPool().static voidncmdPool(long struct, long value) Unsafe version ofcmdPool.static longndevice(long struct) Unsafe version ofdevice().static voidndevice(long struct, org.lwjgl.vulkan.VkDevice value) Unsafe version ofdevice.static org.lwjgl.vulkan.VkPhysicalDeviceMemoryPropertiesndeviceMemoryProperties(long struct) Unsafe version ofdeviceMemoryProperties().static voidndeviceMemoryProperties(long struct, org.lwjgl.vulkan.VkPhysicalDeviceMemoryProperties value) Unsafe version ofdeviceMemoryProperties.static longninstance(long struct) Unsafe version ofinstance().static voidninstance(long struct, org.lwjgl.vulkan.VkInstance value) Unsafe version ofinstance.static @Nullable org.lwjgl.vulkan.VkAllocationCallbacksnpAllocator(long struct) Unsafe version ofpAllocator().static voidnpAllocator(long struct, @Nullable org.lwjgl.vulkan.VkAllocationCallbacks value) Unsafe version ofpAllocator.static longnphysicalDevice(long struct) Unsafe version ofphysicalDevice().static voidnphysicalDevice(long struct, org.lwjgl.vulkan.VkPhysicalDevice value) Unsafe version ofphysicalDevice.static longnqueue(long struct) Unsafe version ofqueue().static voidnqueue(long struct, org.lwjgl.vulkan.VkQueue value) Unsafe version ofqueue.static ktxVulkanFunctionsnvkFuncs(long struct) Unsafe version ofvkFuncs().static voidnvkFuncs(long struct, ktxVulkanFunctions value) Unsafe version ofvkFuncs.@Nullable org.lwjgl.vulkan.VkAllocationCallbackspointer to the allocator to use for the command buffer and created imagespAllocator(@Nullable org.lwjgl.vulkan.VkAllocationCallbacks value) Sets the address of the specifiedVkAllocationCallbacksto thepAllocator()field.longhandle of the physical devicephysicalDevice(org.lwjgl.vulkan.VkPhysicalDevice value) Sets the specified value to thephysicalDevice()field.longqueue()handle to the queue to which to submit commandsqueue(org.lwjgl.vulkan.VkQueue value) Sets the specified value to thequeue()field.set(ktxVulkanDeviceInfo src) Copies the specified struct data to this struct.set(org.lwjgl.vulkan.VkInstance instance, org.lwjgl.vulkan.VkPhysicalDevice physicalDevice, org.lwjgl.vulkan.VkDevice device, org.lwjgl.vulkan.VkQueue queue, org.lwjgl.vulkan.VkCommandBuffer cmdBuffer, long cmdPool, @Nullable org.lwjgl.vulkan.VkAllocationCallbacks pAllocator, org.lwjgl.vulkan.VkPhysicalDeviceMemoryProperties deviceMemoryProperties, ktxVulkanFunctions vkFuncs) Initializes this struct with the specified values.intsizeof()static voidvalidate(long struct) Validates pointer members that should not beNULL.vkFuncs()the functions needed to operate functionsvkFuncs(Consumer<ktxVulkanFunctions> consumer) vkFuncs(ktxVulkanFunctions value) Copies the specifiedktxVulkanFunctionsto thevkFuncs()field.Methods 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. -
INSTANCE
public static final int INSTANCEThe struct member offsets. -
PHYSICALDEVICE
public static final int PHYSICALDEVICEThe struct member offsets. -
DEVICE
public static final int DEVICEThe struct member offsets. -
QUEUE
public static final int QUEUEThe struct member offsets. -
CMDBUFFER
public static final int CMDBUFFERThe struct member offsets. -
CMDPOOL
public static final int CMDPOOLThe struct member offsets. -
PALLOCATOR
public static final int PALLOCATORThe struct member offsets. -
DEVICEMEMORYPROPERTIES
public static final int DEVICEMEMORYPROPERTIESThe struct member offsets. -
VKFUNCS
public static final int VKFUNCSThe struct member offsets.
-
-
Constructor Details
-
ktxVulkanDeviceInfo
Creates aktxVulkanDeviceInfoinstance 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<ktxVulkanDeviceInfo>
-
instance
public long instance()instance used to communicate with vulkan -
physicalDevice
public long physicalDevice()handle of the physical device -
device
public long device()handle of the logical device -
queue
public long queue()handle to the queue to which to submit commands -
cmdBuffer
public long cmdBuffer()handle of the cmdBuffer to use -
cmdPool
public long cmdPool()handle of the command pool from which to allocate the command buffer -
pAllocator
public @Nullable org.lwjgl.vulkan.VkAllocationCallbacks pAllocator()pointer to the allocator to use for the command buffer and created images -
deviceMemoryProperties
public org.lwjgl.vulkan.VkPhysicalDeviceMemoryProperties deviceMemoryProperties()memory properties of the Vulkan physical device -
vkFuncs
the functions needed to operate functions -
instance
Sets the specified value to theinstance()field. -
physicalDevice
Sets the specified value to thephysicalDevice()field. -
device
Sets the specified value to thedevice()field. -
queue
Sets the specified value to thequeue()field. -
cmdBuffer
Sets the specified value to thecmdBuffer()field. -
cmdPool
Sets the specified value to thecmdPool()field. -
pAllocator
Sets the address of the specifiedVkAllocationCallbacksto thepAllocator()field. -
deviceMemoryProperties
public ktxVulkanDeviceInfo deviceMemoryProperties(org.lwjgl.vulkan.VkPhysicalDeviceMemoryProperties value) Copies the specifiedVkPhysicalDeviceMemoryPropertiesto thedeviceMemoryProperties()field. -
vkFuncs
Copies the specifiedktxVulkanFunctionsto thevkFuncs()field. -
vkFuncs
-
set
public ktxVulkanDeviceInfo set(org.lwjgl.vulkan.VkInstance instance, org.lwjgl.vulkan.VkPhysicalDevice physicalDevice, org.lwjgl.vulkan.VkDevice device, org.lwjgl.vulkan.VkQueue queue, org.lwjgl.vulkan.VkCommandBuffer cmdBuffer, long cmdPool, @Nullable org.lwjgl.vulkan.VkAllocationCallbacks pAllocator, org.lwjgl.vulkan.VkPhysicalDeviceMemoryProperties deviceMemoryProperties, ktxVulkanFunctions vkFuncs) Initializes this struct with the specified values. -
set
Copies the specified struct data to this struct.- Parameters:
src- the source struct- Returns:
- this struct
-
malloc
Returns a newktxVulkanDeviceInfoinstance allocated withmemAlloc. The instance must be explicitly freed. -
calloc
Returns a newktxVulkanDeviceInfoinstance allocated withmemCalloc. The instance must be explicitly freed. -
create
Returns a newktxVulkanDeviceInfoinstance allocated withBufferUtils. -
create
Returns a newktxVulkanDeviceInfoinstance for the specified memory address. -
createSafe
-
malloc
Returns a newktxVulkanDeviceInfo.Bufferinstance allocated withmemAlloc. The instance must be explicitly freed.- Parameters:
capacity- the buffer capacity
-
calloc
Returns a newktxVulkanDeviceInfo.Bufferinstance allocated withmemCalloc. The instance must be explicitly freed.- Parameters:
capacity- the buffer capacity
-
create
Returns a newktxVulkanDeviceInfo.Bufferinstance allocated withBufferUtils.- Parameters:
capacity- the buffer capacity
-
create
Create aktxVulkanDeviceInfo.Bufferinstance at the specified memory.- Parameters:
address- the memory addresscapacity- the buffer capacity
-
createSafe
-
malloc
Returns a newktxVulkanDeviceInfoinstance allocated on the specifiedMemoryStack.- Parameters:
stack- the stack from which to allocate
-
calloc
Returns a newktxVulkanDeviceInfoinstance allocated on the specifiedMemoryStackand initializes all its bits to zero.- Parameters:
stack- the stack from which to allocate
-
malloc
Returns a newktxVulkanDeviceInfo.Bufferinstance allocated on the specifiedMemoryStack.- Parameters:
capacity- the buffer capacitystack- the stack from which to allocate
-
calloc
Returns a newktxVulkanDeviceInfo.Bufferinstance allocated on the specifiedMemoryStackand initializes all its bits to zero.- Parameters:
capacity- the buffer capacitystack- the stack from which to allocate
-
ninstance
public static long ninstance(long struct) Unsafe version ofinstance(). -
nphysicalDevice
public static long nphysicalDevice(long struct) Unsafe version ofphysicalDevice(). -
ndevice
public static long ndevice(long struct) Unsafe version ofdevice(). -
nqueue
public static long nqueue(long struct) Unsafe version ofqueue(). -
ncmdBuffer
public static long ncmdBuffer(long struct) Unsafe version ofcmdBuffer(). -
ncmdPool
public static long ncmdPool(long struct) Unsafe version ofcmdPool(). -
npAllocator
public static @Nullable org.lwjgl.vulkan.VkAllocationCallbacks npAllocator(long struct) Unsafe version ofpAllocator(). -
ndeviceMemoryProperties
public static org.lwjgl.vulkan.VkPhysicalDeviceMemoryProperties ndeviceMemoryProperties(long struct) Unsafe version ofdeviceMemoryProperties(). -
nvkFuncs
Unsafe version ofvkFuncs(). -
ninstance
public static void ninstance(long struct, org.lwjgl.vulkan.VkInstance value) Unsafe version ofinstance. -
nphysicalDevice
public static void nphysicalDevice(long struct, org.lwjgl.vulkan.VkPhysicalDevice value) Unsafe version ofphysicalDevice. -
ndevice
public static void ndevice(long struct, org.lwjgl.vulkan.VkDevice value) Unsafe version ofdevice. -
nqueue
public static void nqueue(long struct, org.lwjgl.vulkan.VkQueue value) Unsafe version ofqueue. -
ncmdBuffer
public static void ncmdBuffer(long struct, org.lwjgl.vulkan.VkCommandBuffer value) Unsafe version ofcmdBuffer. -
ncmdPool
public static void ncmdPool(long struct, long value) Unsafe version ofcmdPool. -
npAllocator
public static void npAllocator(long struct, @Nullable org.lwjgl.vulkan.VkAllocationCallbacks value) Unsafe version ofpAllocator. -
ndeviceMemoryProperties
public static void ndeviceMemoryProperties(long struct, org.lwjgl.vulkan.VkPhysicalDeviceMemoryProperties value) Unsafe version ofdeviceMemoryProperties. -
nvkFuncs
Unsafe version ofvkFuncs. -
validate
public static void validate(long struct) Validates pointer members that should not beNULL.- Parameters:
struct- the struct to validate
-