Class VulkanLWJGLArrays


  • public final class VulkanLWJGLArrays
    extends java.lang.Object
    Functions to pack arrays.
    • 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 values
        T - The type of output structs
        B - The type of buffers
        Parameters:
        values - The input values
        packer - A value packer
        allocator - An allocator
        stack - 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 values
        T - The type of output structs
        B - The type of buffers
        Parameters:
        values - The input values
        packer - A value packer
        allocator - An allocator
        stack - The stack for allocations
        Returns:
        An array of packed structs
        Throws:
        VulkanException - On errors