Class VRVulkanTextureData

All Implemented Interfaces:
AutoCloseable, NativeResource, Pointer

public class VRVulkanTextureData extends Struct<VRVulkanTextureData> implements NativeResource
Data required for passing Vulkan textures to Submit. Be sure to call ShutdownInternal before destroying these resources.

Please see https://github.com/ValveSoftware/openvr/wiki/Vulkan for Vulkan-specific documentation.

Layout


 struct VRVulkanTextureData_t {
     uint64_t m_nImage();
     VkDevice_T * m_pDevice;
     VkPhysicalDevice_T * m_pPhysicalDevice;
     VkInstance_T * m_pInstance;
     VkQueue_T * m_pQueue;
     uint32_t m_nQueueFamilyIndex;
     uint32_t m_nWidth;
     uint32_t m_nHeight;
     uint32_t m_nFormat;
     uint32_t m_nSampleCount;
 }
  • Field Details

    • SIZEOF

      public static final int SIZEOF
      The struct size in bytes.
    • ALIGNOF

      public static final int ALIGNOF
      The struct alignment in bytes.
    • M_NIMAGE

      public static final int M_NIMAGE
      The struct member offsets.
    • M_PDEVICE

      public static final int M_PDEVICE
      The struct member offsets.
    • M_PPHYSICALDEVICE

      public static final int M_PPHYSICALDEVICE
      The struct member offsets.
    • M_PINSTANCE

      public static final int M_PINSTANCE
      The struct member offsets.
    • M_PQUEUE

      public static final int M_PQUEUE
      The struct member offsets.
    • M_NQUEUEFAMILYINDEX

      public static final int M_NQUEUEFAMILYINDEX
      The struct member offsets.
    • M_NWIDTH

      public static final int M_NWIDTH
      The struct member offsets.
    • M_NHEIGHT

      public static final int M_NHEIGHT
      The struct member offsets.
    • M_NFORMAT

      public static final int M_NFORMAT
      The struct member offsets.
    • M_NSAMPLECOUNT

      public static final int M_NSAMPLECOUNT
      The struct member offsets.
  • Constructor Details

    • VRVulkanTextureData

      public VRVulkanTextureData(ByteBuffer container)
      Creates a VRVulkanTextureData instance at the current position of the specified ByteBuffer container. 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()
      Description copied from class: Struct
      Returns sizeof(struct).
      Specified by:
      sizeof in class Struct<VRVulkanTextureData>
    • m_nImage

      public long m_nImage()
      VkImage
    • m_pDevice

      public long m_pDevice()
      Returns:
      the value of the m_pDevice field.
    • m_pPhysicalDevice

      public long m_pPhysicalDevice()
      Returns:
      the value of the m_pPhysicalDevice field.
    • m_pInstance

      public long m_pInstance()
      Returns:
      the value of the m_pInstance field.
    • m_pQueue

      public long m_pQueue()
      Returns:
      the value of the m_pQueue field.
    • m_nQueueFamilyIndex

      public int m_nQueueFamilyIndex()
      Returns:
      the value of the m_nQueueFamilyIndex field.
    • m_nWidth

      public int m_nWidth()
      Returns:
      the value of the m_nWidth field.
    • m_nHeight

      public int m_nHeight()
      Returns:
      the value of the m_nHeight field.
    • m_nFormat

      public int m_nFormat()
      Returns:
      the value of the m_nFormat field.
    • m_nSampleCount

      public int m_nSampleCount()
      Returns:
      the value of the m_nSampleCount field.
    • m_nImage

      public VRVulkanTextureData m_nImage(long value)
      Sets the specified value to the m_nImage() field.
    • m_pDevice

      public VRVulkanTextureData m_pDevice(long value)
      Sets the specified value to the m_pDevice field.
    • m_pPhysicalDevice

      public VRVulkanTextureData m_pPhysicalDevice(long value)
      Sets the specified value to the m_pPhysicalDevice field.
    • m_pInstance

      public VRVulkanTextureData m_pInstance(long value)
      Sets the specified value to the m_pInstance field.
    • m_pQueue

      public VRVulkanTextureData m_pQueue(long value)
      Sets the specified value to the m_pQueue field.
    • m_nQueueFamilyIndex

      public VRVulkanTextureData m_nQueueFamilyIndex(int value)
      Sets the specified value to the m_nQueueFamilyIndex field.
    • m_nWidth

      public VRVulkanTextureData m_nWidth(int value)
      Sets the specified value to the m_nWidth field.
    • m_nHeight

      public VRVulkanTextureData m_nHeight(int value)
      Sets the specified value to the m_nHeight field.
    • m_nFormat

      public VRVulkanTextureData m_nFormat(int value)
      Sets the specified value to the m_nFormat field.
    • m_nSampleCount

      public VRVulkanTextureData m_nSampleCount(int value)
      Sets the specified value to the m_nSampleCount field.
    • set

      public VRVulkanTextureData set(long m_nImage, long m_pDevice, long m_pPhysicalDevice, long m_pInstance, long m_pQueue, int m_nQueueFamilyIndex, int m_nWidth, int m_nHeight, int m_nFormat, int m_nSampleCount)
      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

      public static VRVulkanTextureData malloc()
      Returns a new VRVulkanTextureData instance allocated with memAlloc. The instance must be explicitly freed.
    • calloc

      public static VRVulkanTextureData calloc()
      Returns a new VRVulkanTextureData instance allocated with memCalloc. The instance must be explicitly freed.
    • create

      public static VRVulkanTextureData create()
      Returns a new VRVulkanTextureData instance allocated with BufferUtils.
    • create

      public static VRVulkanTextureData create(long address)
      Returns a new VRVulkanTextureData instance for the specified memory address.
    • createSafe

      @Nullable public static VRVulkanTextureData createSafe(long address)
      Like create, but returns null if address is NULL.
    • malloc

      public static VRVulkanTextureData.Buffer malloc(int capacity)
      Returns a new VRVulkanTextureData.Buffer instance allocated with memAlloc. The instance must be explicitly freed.
      Parameters:
      capacity - the buffer capacity
    • calloc

      public static VRVulkanTextureData.Buffer calloc(int capacity)
      Returns a new VRVulkanTextureData.Buffer instance allocated with memCalloc. The instance must be explicitly freed.
      Parameters:
      capacity - the buffer capacity
    • create

      public static VRVulkanTextureData.Buffer create(int capacity)
      Returns a new VRVulkanTextureData.Buffer instance allocated with BufferUtils.
      Parameters:
      capacity - the buffer capacity
    • create

      public static VRVulkanTextureData.Buffer create(long address, int capacity)
      Create a VRVulkanTextureData.Buffer instance at the specified memory.
      Parameters:
      address - the memory address
      capacity - the buffer capacity
    • createSafe

      @Nullable public static VRVulkanTextureData.Buffer createSafe(long address, int capacity)
      Like create, but returns null if address is NULL.
    • mallocStack

      @Deprecated public static VRVulkanTextureData mallocStack()
      Deprecated.
      Deprecated for removal in 3.4.0. Use malloc(MemoryStack) instead.
    • callocStack

      @Deprecated public static VRVulkanTextureData callocStack()
      Deprecated.
      Deprecated for removal in 3.4.0. Use calloc(MemoryStack) instead.
    • mallocStack

      @Deprecated public static VRVulkanTextureData mallocStack(MemoryStack stack)
      Deprecated.
      Deprecated for removal in 3.4.0. Use malloc(MemoryStack) instead.
    • callocStack

      @Deprecated public static VRVulkanTextureData callocStack(MemoryStack stack)
      Deprecated.
      Deprecated for removal in 3.4.0. Use calloc(MemoryStack) instead.
    • mallocStack

      @Deprecated public static VRVulkanTextureData.Buffer mallocStack(int capacity)
      Deprecated.
      Deprecated for removal in 3.4.0. Use malloc(int, MemoryStack) instead.
    • callocStack

      @Deprecated public static VRVulkanTextureData.Buffer callocStack(int capacity)
      Deprecated.
      Deprecated for removal in 3.4.0. Use calloc(int, MemoryStack) instead.
    • mallocStack

      @Deprecated public static VRVulkanTextureData.Buffer mallocStack(int capacity, MemoryStack stack)
      Deprecated.
      Deprecated for removal in 3.4.0. Use malloc(int, MemoryStack) instead.
    • callocStack

      @Deprecated public static VRVulkanTextureData.Buffer callocStack(int capacity, MemoryStack stack)
      Deprecated.
      Deprecated for removal in 3.4.0. Use calloc(int, MemoryStack) instead.
    • malloc

      public static VRVulkanTextureData malloc(MemoryStack stack)
      Returns a new VRVulkanTextureData instance allocated on the specified MemoryStack.
      Parameters:
      stack - the stack from which to allocate
    • calloc

      public static VRVulkanTextureData calloc(MemoryStack stack)
      Returns a new VRVulkanTextureData instance allocated on the specified MemoryStack and initializes all its bits to zero.
      Parameters:
      stack - the stack from which to allocate
    • malloc

      public static VRVulkanTextureData.Buffer malloc(int capacity, MemoryStack stack)
      Returns a new VRVulkanTextureData.Buffer instance allocated on the specified MemoryStack.
      Parameters:
      capacity - the buffer capacity
      stack - the stack from which to allocate
    • calloc

      public static VRVulkanTextureData.Buffer calloc(int capacity, MemoryStack stack)
      Returns a new VRVulkanTextureData.Buffer instance allocated on the specified MemoryStack and initializes all its bits to zero.
      Parameters:
      capacity - the buffer capacity
      stack - the stack from which to allocate
    • nm_nImage

      public static long nm_nImage(long struct)
      Unsafe version of m_nImage().
    • nm_pDevice

      public static long nm_pDevice(long struct)
      Unsafe version of m_pDevice().
    • nm_pPhysicalDevice

      public static long nm_pPhysicalDevice(long struct)
      Unsafe version of m_pPhysicalDevice().
    • nm_pInstance

      public static long nm_pInstance(long struct)
      Unsafe version of m_pInstance().
    • nm_pQueue

      public static long nm_pQueue(long struct)
      Unsafe version of m_pQueue().
    • nm_nQueueFamilyIndex

      public static int nm_nQueueFamilyIndex(long struct)
      Unsafe version of m_nQueueFamilyIndex().
    • nm_nWidth

      public static int nm_nWidth(long struct)
      Unsafe version of m_nWidth().
    • nm_nHeight

      public static int nm_nHeight(long struct)
      Unsafe version of m_nHeight().
    • nm_nFormat

      public static int nm_nFormat(long struct)
      Unsafe version of m_nFormat().
    • nm_nSampleCount

      public static int nm_nSampleCount(long struct)
      Unsafe version of m_nSampleCount().
    • nm_nImage

      public static void nm_nImage(long struct, long value)
      Unsafe version of m_nImage.
    • nm_pDevice

      public static void nm_pDevice(long struct, long value)
      Unsafe version of m_pDevice.
    • nm_pPhysicalDevice

      public static void nm_pPhysicalDevice(long struct, long value)
      Unsafe version of m_pPhysicalDevice.
    • nm_pInstance

      public static void nm_pInstance(long struct, long value)
      Unsafe version of m_pInstance.
    • nm_pQueue

      public static void nm_pQueue(long struct, long value)
      Unsafe version of m_pQueue.
    • nm_nQueueFamilyIndex

      public static void nm_nQueueFamilyIndex(long struct, int value)
      Unsafe version of m_nQueueFamilyIndex.
    • nm_nWidth

      public static void nm_nWidth(long struct, int value)
      Unsafe version of m_nWidth.
    • nm_nHeight

      public static void nm_nHeight(long struct, int value)
      Unsafe version of m_nHeight.
    • nm_nFormat

      public static void nm_nFormat(long struct, int value)
      Unsafe version of m_nFormat.
    • nm_nSampleCount

      public static void nm_nSampleCount(long struct, int value)
      Unsafe version of m_nSampleCount.
    • validate

      public static void validate(long struct)
      Validates pointer members that should not be NULL.
      Parameters:
      struct - the struct to validate