Split vulkan_base into smaller units
Closes #30. This is a basic refactoring of the graphics module, so everything won't be in single file.
This commit is contained in:
1 parent
649e7f76fe
commit
6a09350902
32 files changed
+2354
-2002
No files matched your search
@@ -0,0 +1,47 @@
|
||||
#include "rse_graphics.hpp"
|
||||
#include "window.hpp"
|
||||
#include "vulkan_base.hpp"
|
||||
|
||||
namespace rse::graphics
|
||||
{
|
||||
|
||||
RseGraphics::RseGraphics()
|
||||
{
|
||||
vulkan_state = {
|
||||
.graphicsQueue = VK_NULL_HANDLE,
|
||||
.physicalDevice = VK_NULL_HANDLE,
|
||||
.currentFrame = 0U,
|
||||
.queueFamilyIndices = {0U}, /* TODO: Change when more families are needed */
|
||||
.uniformBuffers = {},
|
||||
.pCommandBuffers = {},
|
||||
.descriptorSets = {},
|
||||
.swapChainImageViews = {},
|
||||
.swapchainExtent = {},
|
||||
.renderPass = VK_NULL_HANDLE,
|
||||
.descriptorSetLayout = VK_NULL_HANDLE,
|
||||
.swapchainFramebuffers = {},
|
||||
.graphicsPipeline = VK_NULL_HANDLE,
|
||||
.pipelineLayout = VK_NULL_HANDLE,
|
||||
.swapchain = VK_NULL_HANDLE,
|
||||
};
|
||||
}
|
||||
|
||||
uint8_t RseGraphics::graphics_run(void)
|
||||
{
|
||||
|
||||
window::windowInit();
|
||||
|
||||
if (0 != vulkanbase::initVulkan(vulkan_state))
|
||||
return -1;
|
||||
|
||||
window::windowLoop(vulkan_state);
|
||||
|
||||
vulkanbase::deinitVulkan(vulkan_state);
|
||||
|
||||
window::windowTerminate();
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
} // namespace rse::graphics
|
||||
Reference in new issue
Block a user