Fixed buffer types
This commit is contained in:
parent
f86ff6dd27
commit
5425a096bc
1 changed files with 3 additions and 3 deletions
|
|
@ -331,18 +331,18 @@ public:
|
||||||
v.pos[1] -= 0.5f;
|
v.pos[1] -= 0.5f;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Generate device local buffers for the text vertices and indices and upload the data
|
// Generate host accesible buffers for the text vertices and indices and upload the data
|
||||||
|
|
||||||
VK_CHECK_RESULT(vulkanDevice->createBuffer(
|
VK_CHECK_RESULT(vulkanDevice->createBuffer(
|
||||||
VK_BUFFER_USAGE_VERTEX_BUFFER_BIT,
|
VK_BUFFER_USAGE_VERTEX_BUFFER_BIT,
|
||||||
VK_MEMORY_PROPERTY_DEVICE_LOCAL_BIT | VK_MEMORY_PROPERTY_HOST_COHERENT_BIT,
|
VK_MEMORY_PROPERTY_HOST_VISIBLE_BIT | VK_MEMORY_PROPERTY_HOST_COHERENT_BIT,
|
||||||
&vertexBuffer,
|
&vertexBuffer,
|
||||||
vertices.size() * sizeof(Vertex),
|
vertices.size() * sizeof(Vertex),
|
||||||
vertices.data()));
|
vertices.data()));
|
||||||
|
|
||||||
VK_CHECK_RESULT(vulkanDevice->createBuffer(
|
VK_CHECK_RESULT(vulkanDevice->createBuffer(
|
||||||
VK_BUFFER_USAGE_INDEX_BUFFER_BIT,
|
VK_BUFFER_USAGE_INDEX_BUFFER_BIT,
|
||||||
VK_MEMORY_PROPERTY_DEVICE_LOCAL_BIT | VK_MEMORY_PROPERTY_HOST_COHERENT_BIT,
|
VK_MEMORY_PROPERTY_HOST_VISIBLE_BIT | VK_MEMORY_PROPERTY_HOST_COHERENT_BIT,
|
||||||
&indexBuffer,
|
&indexBuffer,
|
||||||
indices.size() * sizeof(uint32_t),
|
indices.size() * sizeof(uint32_t),
|
||||||
indices.data()));
|
indices.data()));
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue