Class VulkanLWJGLScalarArrays

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

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

    • packLongs

      public static <T> LongBuffer packLongs(org.lwjgl.system.MemoryStack stack, List<T> values, VulkanLWJGLScalarArrays.LongGetterType<T> getter) throws VulkanException
      Pack a list of long values.
      Type Parameters:
      T - The type of input values
      Parameters:
      stack - The stack
      values - The input list
      getter - A function from T to long
      Returns:
      A packed list
      Throws:
      VulkanException - If required
    • packLongsAsByteBuffer

      public static <T> ByteBuffer packLongsAsByteBuffer(org.lwjgl.system.MemoryStack stack, List<T> values, VulkanLWJGLScalarArrays.LongGetterType<T> getter) throws VulkanException
      Pack a list of long values.
      Type Parameters:
      T - The type of input values
      Parameters:
      stack - The stack
      values - The input list
      getter - A function from T to long
      Returns:
      A packed list
      Throws:
      VulkanException - If required
    • packLongsOrNull

      public static <T> LongBuffer packLongsOrNull(org.lwjgl.system.MemoryStack stack, List<T> values, VulkanLWJGLScalarArrays.LongGetterType<T> getter) throws VulkanException
      Pack a list of long values. Returns null if the input list is empty.
      Type Parameters:
      T - The type of input values
      Parameters:
      stack - The stack
      values - The input list
      getter - A function from T to long
      Returns:
      A packed list
      Throws:
      VulkanException - If required
    • packInts

      public static <T> IntBuffer packInts(org.lwjgl.system.MemoryStack stack, List<T> values, VulkanLWJGLScalarArrays.IntGetterType<T> getter) throws VulkanException
      Pack a list of int values.
      Type Parameters:
      T - The type of input values
      Parameters:
      stack - The stack
      values - The input list
      getter - A function from T to int
      Returns:
      A packed list
      Throws:
      VulkanException - If required
    • packIntsAsByteBuffer

      public static <T> ByteBuffer packIntsAsByteBuffer(org.lwjgl.system.MemoryStack stack, List<T> values, VulkanLWJGLScalarArrays.IntGetterType<T> getter) throws VulkanException
      Pack a list of int values.
      Type Parameters:
      T - The type of input values
      Parameters:
      stack - The stack
      values - The input list
      getter - A function from T to int
      Returns:
      A packed list
      Throws:
      VulkanException - If required
    • packIntsOrNull

      public static <T> IntBuffer packIntsOrNull(org.lwjgl.system.MemoryStack stack, List<T> values, VulkanLWJGLScalarArrays.IntGetterType<T> getter) throws VulkanException
      Pack a list of int values. Returns null if the input list is empty.
      Type Parameters:
      T - The type of input values
      Parameters:
      stack - The stack
      values - The input list
      getter - A function from T to int
      Returns:
      A packed list
      Throws:
      VulkanException - If required
    • packPointers

      public static <T> org.lwjgl.PointerBuffer packPointers(org.lwjgl.system.MemoryStack stack, List<T> values, VulkanLWJGLScalarArrays.LongGetterType<T> getter) throws VulkanException
      Pack a list of pointer values.
      Type Parameters:
      T - The type of input values
      Parameters:
      stack - The stack
      values - The input list
      getter - A function from T to long
      Returns:
      A packed list
      Throws:
      VulkanException - If required
    • packPointersOrNull

      public static <T> org.lwjgl.PointerBuffer packPointersOrNull(org.lwjgl.system.MemoryStack stack, List<T> values, VulkanLWJGLScalarArrays.LongGetterType<T> getter) throws VulkanException
      Pack a list of pointer values. Returns null if the input list is empty.
      Type Parameters:
      T - The type of input values
      Parameters:
      stack - The stack
      values - The input list
      getter - A function from T to long
      Returns:
      A packed list
      Throws:
      VulkanException - If required
    • packFloatsAsByteBuffer

      public static <T> ByteBuffer packFloatsAsByteBuffer(org.lwjgl.system.MemoryStack stack, List<T> values, VulkanLWJGLScalarArrays.FloatGetterType<T> getter) throws VulkanException
      Pack a list of float values.
      Type Parameters:
      T - The type of input values
      Parameters:
      stack - The stack
      values - The input list
      getter - A function from T to float
      Returns:
      A packed list
      Throws:
      VulkanException - If required
    • packDoublesAsByteBuffer

      public static <T> ByteBuffer packDoublesAsByteBuffer(org.lwjgl.system.MemoryStack stack, List<T> values, VulkanLWJGLScalarArrays.DoubleGetterType<T> getter) throws VulkanException
      Pack a list of double values.
      Type Parameters:
      T - The type of input values
      Parameters:
      stack - The stack
      values - The input list
      getter - A function from T to double
      Returns:
      A packed list
      Throws:
      VulkanException - If required