Class VulkanLWJGLArrays

java.lang.Object
com.io7m.jcoronado.lwjgl.internal.VulkanLWJGLArrays

public final class VulkanLWJGLArrays extends Object
Functions to pack arrays.
  • Method Details

    • pack

      public static <A, T extends org.lwjgl.system.Struct<T>, B extends org.lwjgl.system.StructBuffer<T, B>> B pack(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<T>, B extends org.lwjgl.system.StructBuffer<T, B>> B packOrNull(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