Change vertex buffer handling
Previously vertex data was only in shaders. I have removed it from there and put hardcoded vertex data into cpp source code.
This commit is contained in:
1 parent
e7b9d4a32f
commit
34665e1c2e
5 files changed
+177
-29
No files matched your search
@@ -31,6 +31,8 @@ enum Errors
|
||||
VULKAN_FAILED_TO_CREATE_DEVICE,
|
||||
VULKAN_ALLOCATOR_CREATION_FAILED,
|
||||
VULKAN_COMMAND_POOL_CREATION_FAILED,
|
||||
VULKAN_VERTEX_BUFFER_CREATION_FAILED,
|
||||
VULKAN_VERTEX_BUFFER_MAPPING_FAILED,
|
||||
VULKAN_COMMAND_BUFFER_ALLOCATION_FAILED,
|
||||
VULKAN_SURFACE_CREATION_FAILED,
|
||||
VULKAN_SWAPCHAIN_CREATION_FAILED,
|
||||
@@ -62,6 +64,10 @@ std::array<std::array<const char*, LAST_MESSAGE>, LAST_LANGUAGE> vulkanErrorMess
|
||||
"Failed to create Vulkan Memory Allocator",
|
||||
/* VULKAN_COMMAND_POOL_CREATION_FAILED */
|
||||
"Failed to create command pool",
|
||||
/* VULKAN_VERTEX_BUFFER_CREATION_FAILED */
|
||||
"Failed to create a vertex buffer",
|
||||
/* VULKAN_VERTEX_BUFFER_MAPPING_FAILED */
|
||||
"Failed to map vulkan memory buffer",
|
||||
/* VULKAN_COMMAND_BUFFER_ALLOCATION_FAILED */
|
||||
"Failed to allocate command buffers",
|
||||
/* VULKAN_SURFACE_CREATION_FAILED */
|
||||
|
||||
@@ -16,9 +16,25 @@
|
||||
namespace rse::graphics::vulkanbase
|
||||
{
|
||||
|
||||
/**
|
||||
* @brief Initialize Vulkan backend
|
||||
*
|
||||
* @return uint8_t 0 on success. Status code on failure
|
||||
*/
|
||||
|
||||
|
||||
uint8_t initVulkan();
|
||||
|
||||
/**
|
||||
* @brief Deinitialize Vulkan backend
|
||||
*
|
||||
*/
|
||||
void deinitVulkan();
|
||||
|
||||
/**
|
||||
* @brief Draw frame on the screen.
|
||||
*
|
||||
*/
|
||||
void drawFrame();
|
||||
|
||||
} /* namespace rse::graphics::vulkanbase */
|
||||
Reference in new issue
Block a user