<p>Vulkan uses vertex attributes. Here is an example:</p>
<pre><code>const VkVertexInputAttributeDescription vertexAttributes[] = {
    // location, binding, format, offset
    { 0,        0,      VK_FORMAT_R32G32B32_SFLOAT,     0 }, // inPosition
    { 1,        0,      VK_FORMAT_R32G32B32_SFLOAT,     12 }, // inNormal
    { 2,        0,      VK_FORMAT_R32G32B32A32_SFLOAT,      24 }, // inTangent
    { 3,        0,      VK_FORMAT_R32G32_SFLOAT,        40 }, // inTexCoord
};
</code></pre>
<p>And a description:</p>
<pre><code>const VkVertexInputBindingDescription vertexInputBindings[] = { 
    // binding, stride, inputRate
    { 0, 48, VK_VERTEX_INPUT_RATE_VERTEX} 
};
</code></pre>

CC BY-SA 4.0
2021-06-02T11:23:43.950Z
2021-06-02T11:23:43.950Z
pmw1234
<p>Is there any directX FVF(Flexible Vertex Format ) equivalent in OpenGL/Vulkan.</p>

<opengl><vulkan><directx>
DirectX FVF(Flexible Vertex Format ) equivalent in OpenGL/Vulkan?
Cerberus
# DirectX FVF(Flexible Vertex Format ) equivalent in OpenGL/Vulkan?

(Asked by: username_0 on 2021-06-02)

Is there any directX FVF(Flexible Vertex Format ) equivalent in OpenGL/Vulkan.

**Tags:** opengl, vulkan, directx


---

## 1 answers

### Answer by username_1 on 2021-06-02. Score: 2

Vulkan uses vertex attributes. Here is an example:

```
const VkVertexInputAttributeDescription vertexAttributes[] = {
    // location, binding, format, offset
    { 0,        0,      VK_FORMAT_R32G32B32_SFLOAT,     0 }, // inPosition
    { 1,        0,      VK_FORMAT_R32G32B32_SFLOAT,     12 }, // inNormal
    { 2,        0,      VK_FORMAT_R32G32B32A32_SFLOAT,      24 }, // inTangent
    { 3,        0,      VK_FORMAT_R32G32_SFLOAT,        40 }, // inTexCoord
};

```

And a description:

```
const VkVertexInputBindingDescription vertexInputBindings[] = { 
    // binding, stride, inputRate
    { 0, 48, VK_VERTEX_INPUT_RATE_VERTEX} 
};

```


---

