Window Name setable through app.run(...)
This commit is contained in:
@@ -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
|
||||
|
||||
|
||||
Reference in New Issue
Block a user