Window Name setable through app.run(...)

This commit is contained in:
Ano-sys
2025-04-03 18:56:00 +02:00
parent 847d39906d
commit 498b7594b7
3 changed files with 15 additions and 7 deletions
+5 -2
View File
@@ -22,6 +22,7 @@
namespace vapp{
// Change here for other presentMode
const VkPresentModeKHR WISHED_PRESENT_MODE = VK_PRESENT_MODE_MAILBOX_KHR;
typedef struct _QueueFamilyIndices{
@@ -43,6 +44,7 @@ static std::vector<char> readFile(const std::string &filename);
class Vulkan{
private:
#pragma region Fields
GLFWwindow *window;
uint32_t _width, _height;
@@ -76,6 +78,7 @@ private:
VkFence inFlightFence;
std::vector<VkFramebuffer> swapChainFramebuffers;
#pragma endregion
bool checkValidationLayerSupport();
std::vector<const char*> getRequiredExtensions();
@@ -103,7 +106,7 @@ private:
void recordCommandBuffer(VkCommandBuffer commandBuffer, uint32_t imageIndex);
void createSyncObjects();
void drawFrame();
void initWindow();
void initWindow(const char* windowName);
void initVulkan();
void mainLoop();
void cleanup();
@@ -115,7 +118,7 @@ public:
const bool enableValidationLayers = false;
#endif
void run(const uint32_t width = 800, const uint32_t height = 600);
void run(const char* windowName, const uint32_t width = 800, const uint32_t height = 600);
};
} // vapp