Fixed buffer types

This commit is contained in:
saschawillems 2017-01-23 16:03:53 +01:00
parent f86ff6dd27
commit 5425a096bc

View file

@ -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()));