- java.lang.Object
-
- com.io7m.jcoronado.lwjgl.VulkanLWJGLArrays
-
public final class VulkanLWJGLArrays extends java.lang.Object
Functions to pack arrays.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static interface
VulkanLWJGLArrays.BufferAllocatorType<T extends org.lwjgl.system.Struct,B extends org.lwjgl.system.StructBuffer<T,B>>
The type of functions that can allocate buffers for structures of typeT
.static interface
VulkanLWJGLArrays.PackingFunctionType<A,T extends org.lwjgl.system.Struct>
The type of functions that can pack values of typeA
into structures of typeT
.
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static <A,T extends org.lwjgl.system.Struct,B extends org.lwjgl.system.StructBuffer<T,B>>
Bpack(java.util.List<A> values, VulkanLWJGLArrays.PackingFunctionType<A,T> packer, VulkanLWJGLArrays.BufferAllocatorType<T,B> allocator, org.lwjgl.system.MemoryStack stack)
Pack an array of values.static <A,T extends org.lwjgl.system.Struct,B extends org.lwjgl.system.StructBuffer<T,B>>
BpackOrNull(java.util.List<A> values, VulkanLWJGLArrays.PackingFunctionType<A,T> packer, VulkanLWJGLArrays.BufferAllocatorType<T,B> allocator, org.lwjgl.system.MemoryStack stack)
Pack an array of values.
-
-
-
Method Detail
-
pack
public static <A,T extends org.lwjgl.system.Struct,B extends org.lwjgl.system.StructBuffer<T,B>> B pack(java.util.List<A> values, VulkanLWJGLArrays.PackingFunctionType<A,T> packer, VulkanLWJGLArrays.BufferAllocatorType<T,B> allocator, org.lwjgl.system.MemoryStack stack) throws VulkanException
Pack an array of values.- Type Parameters:
A
- The type of input valuesT
- The type of output structsB
- The type of buffers- Parameters:
values
- The input valuespacker
- A value packerallocator
- An allocatorstack
- The stack for allocations- Returns:
- An array of packed structs
- Throws:
VulkanException
- On errors
-
packOrNull
public static <A,T extends org.lwjgl.system.Struct,B extends org.lwjgl.system.StructBuffer<T,B>> B packOrNull(java.util.List<A> values, VulkanLWJGLArrays.PackingFunctionType<A,T> packer, VulkanLWJGLArrays.BufferAllocatorType<T,B> allocator, org.lwjgl.system.MemoryStack stack) throws VulkanException
Pack an array of values.- Type Parameters:
A
- The type of input valuesT
- The type of output structsB
- The type of buffers- Parameters:
values
- The input valuespacker
- A value packerallocator
- An allocatorstack
- The stack for allocations- Returns:
- An array of packed structs
- Throws:
VulkanException
- On errors
-
-