Made messages slightly easier to read
This commit is contained in:
parent
3d241b8718
commit
06cf213feb
1 changed files with 4 additions and 3 deletions
|
|
@ -30,7 +30,7 @@ debugCallback(VkDebugUtilsMessageSeverityFlagBitsEXT messageSeverity,
|
||||||
void *pUserData) {
|
void *pUserData) {
|
||||||
// TODO: Put all messages into a log file
|
// TODO: Put all messages into a log file
|
||||||
if (messageSeverity >= VK_DEBUG_UTILS_MESSAGE_SEVERITY_WARNING_BIT_EXT) {
|
if (messageSeverity >= VK_DEBUG_UTILS_MESSAGE_SEVERITY_WARNING_BIT_EXT) {
|
||||||
fprintf(stderr, "validation layer: %s\n", pCallbackData->pMessage);
|
fprintf(stderr, "validation layer: %s\n\n", pCallbackData->pMessage);
|
||||||
}
|
}
|
||||||
|
|
||||||
return VK_FALSE;
|
return VK_FALSE;
|
||||||
|
|
@ -734,9 +734,9 @@ void createGraphicsPipeline(VulkanApp *app) {
|
||||||
|
|
||||||
VkVertexInputBindingDescription bindingDescription = getBindingDescription();
|
VkVertexInputBindingDescription bindingDescription = getBindingDescription();
|
||||||
#define attributeDescriptionsCount 2
|
#define attributeDescriptionsCount 2
|
||||||
|
// TODO: Probably better to move to dynamic array
|
||||||
VkVertexInputAttributeDescription
|
VkVertexInputAttributeDescription
|
||||||
attributeDescriptions[attributeDescriptionsCount] = {
|
attributeDescriptions[attributeDescriptionsCount] = {0};
|
||||||
0}; // TODO: Probably better to move to dynamic array
|
|
||||||
populateAttributeDescriptions(
|
populateAttributeDescriptions(
|
||||||
(VkVertexInputAttributeDescription *)&attributeDescriptions);
|
(VkVertexInputAttributeDescription *)&attributeDescriptions);
|
||||||
|
|
||||||
|
|
@ -1090,6 +1090,7 @@ void createVertexBuffer(VulkanApp *app) {
|
||||||
bufferInfo.size = sizeof(vertices[0]) * vertexCount;
|
bufferInfo.size = sizeof(vertices[0]) * vertexCount;
|
||||||
bufferInfo.usage = VK_BUFFER_USAGE_VERTEX_BUFFER_BIT;
|
bufferInfo.usage = VK_BUFFER_USAGE_VERTEX_BUFFER_BIT;
|
||||||
bufferInfo.sharingMode = VK_SHARING_MODE_EXCLUSIVE;
|
bufferInfo.sharingMode = VK_SHARING_MODE_EXCLUSIVE;
|
||||||
|
|
||||||
if (vkCreateBuffer(app->device, &bufferInfo, NULL, &app->vertexBuffer) !=
|
if (vkCreateBuffer(app->device, &bufferInfo, NULL, &app->vertexBuffer) !=
|
||||||
VK_SUCCESS) {
|
VK_SUCCESS) {
|
||||||
fprintf(stderr, "Failed to create vertex buffer!\n");
|
fprintf(stderr, "Failed to create vertex buffer!\n");
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue