Чистка кода

This commit is contained in:
Jiga228
2026-05-24 11:21:38 +07:00
parent 582b23d0f8
commit fa3e987e93
2 changed files with 53 additions and 38 deletions
@@ -3,14 +3,12 @@
#include "RenderEngineBase.hpp"
#include "ModelManager.hpp"
#include <optional>
#include <vector>
#include <string>
#include <memory>
#define GLM_FORCE_RADIANS
#include <glm/glm.hpp>
#include <glm/gtc/matrix_transform.hpp>
class GPU_GarbageCollector;
@@ -18,15 +16,18 @@ class UwURenderEngine : public RenderEngineBase
{
struct QueueFamilyIndices
{
std::optional<uint32_t> graphics_family;
std::optional<uint32_t> present_family;
std::optional<uint32_t> transfer_family;
uint32_t graphics_family = 0;
uint32_t present_family = 0;
uint32_t transfer_family = 0;
bool is_find_graphics_family = false;
bool is_find_present_family = false;
bool is_find_transfer_family = false;
};
struct SwapchainSupportDetails
{
VkSurfaceCapabilitiesKHR capabilities;
std::vector<VkSurfaceFormatKHR> formats;
std::vector<VkPresentModeKHR> present_modes;
VkSurfaceCapabilitiesKHR capabilities;
};
struct UniformBufferObject {
glm::mat4 model;
@@ -55,8 +56,8 @@ class UwURenderEngine : public RenderEngineBase
static const std::vector<const char*> deviceExtensions;
int current_frame_ = 0;
// Counting frame from the beginning
unsigned int current_frame_ = 0;
CoreInstance& core_;
std::shared_ptr<ModelManager> model_manager_;
@@ -130,7 +131,7 @@ class UwURenderEngine : public RenderEngineBase
void allocate_index_buffer();
void record_command_buffer(VkCommandBuffer command_buffer, uint32_t image_index) const;
void update_uniform_buffer(uint32_t current_frame);
void update_uniform_buffer(uint32_t current_frame) const;
void draw_frame();
public:
// Can throw the exception