C Specification

The VkGeometryTrianglesNV structure is defined as:

typedef struct VkGeometryTrianglesNV {
    VkStructureType    sType;
    const void*        pNext;
    VkBuffer           vertexData;
    VkDeviceSize       vertexOffset;
    uint32_t           vertexCount;
    VkDeviceSize       vertexStride;
    VkFormat           vertexFormat;
    VkBuffer           indexData;
    VkDeviceSize       indexOffset;
    uint32_t           indexCount;
    VkIndexType        indexType;
    VkBuffer           transformData;
    VkDeviceSize       transformOffset;
} VkGeometryTrianglesNV;

Members

  • sType is the type of this structure.

  • pNext is NULL or a pointer to an extension-specific structure.

  • vertexData is the buffer containing vertex data for this geometry.

  • vertexOffset is the offset in bytes within vertexData containing vertex data for this geometry.

  • vertexCount is the number of valid vertices.

  • vertexStride is the stride in bytes between each vertex.

  • vertexFormat is the format of each vertex element.

  • indexData is the buffer containing index data for this geometry.

  • indexOffset is the offset in bytes within indexData containing index data for this geometry.

  • indexCount is the number of indices to include in this geometry.

  • indexType is the format of each index.

  • transformData is a buffer containing optional reference to an array of 32-bit floats representing a 3x4 row major affine transformation matrix for this geometry.

  • transformOffset is the offset in bytes in transformData of the transform information described above.

Description

If indexType is VK_INDEX_TYPE_NONE_NV, then this structure describes a set of triangles determined by vertexCount. Otherwise, this structure describes a set of indexed triangles determined by indexCount.

Valid Usage
  • vertexOffset must be less than the size of vertexData

  • vertexOffset must be a multiple of the component size of vertexFormat

  • vertexFormat must be one of VK_FORMAT_R32G32B32_SFLOAT, VK_FORMAT_R32G32_SFLOAT, VK_FORMAT_R16G16B16_SFLOAT, VK_FORMAT_R16G16_SFLOAT, VK_FORMAT_R16G16_SNORM, or VK_FORMAT_R16G16B16_SNORM

  • indexOffset must be less than the size of indexData

  • indexOffset must be a multiple of the element size of indexType

  • indexType must be VK_INDEX_TYPE_UINT16, VK_INDEX_TYPE_UINT32, or VK_INDEX_TYPE_NONE_NV

  • indexData must be VK_NULL_HANDLE if indexType is VK_INDEX_TYPE_NONE_NV

  • indexData must be a valid VkBuffer handle if indexType is not VK_INDEX_TYPE_NONE_NV

  • indexCount must be 0 if indexType is VK_INDEX_TYPE_NONE_NV

  • transformOffset must be less than the size of transformData

  • transformOffset must be a multiple of 16

Valid Usage (Implicit)
  • sType must be VK_STRUCTURE_TYPE_GEOMETRY_TRIANGLES_NV

  • pNext must be NULL

  • If vertexData is not VK_NULL_HANDLE, vertexData must be a valid VkBuffer handle

  • vertexFormat must be a valid VkFormat value

  • If indexData is not VK_NULL_HANDLE, indexData must be a valid VkBuffer handle

  • indexType must be a valid VkIndexType value

  • If transformData is not VK_NULL_HANDLE, transformData must be a valid VkBuffer handle

  • Each of indexData, transformData, and vertexData that are valid handles of non-ignored parameters must have been created, allocated, or retrieved from the same VkDevice

See Also

Document Notes

For more information, see the Vulkan Specification

This page is extracted from the Vulkan Specification. Fixes and changes should be made to the Specification, not directly.

Copyright (c) 2014-2019 Khronos Group. This work is licensed under a Creative Commons Attribution 4.0 International License.