move some options from swap chain to engine configuration and fix not working VSync
This commit is contained in:
@@ -10,6 +10,7 @@
|
||||
#include "Image.hpp"
|
||||
#include "FrameBuffer.hpp"
|
||||
#include "Base/UI/IWindow.hpp"
|
||||
#include "Base/EngineConfiguration.hpp"
|
||||
#include "Base/Logger.hpp"
|
||||
#include <vulkan/vulkan.hpp>
|
||||
|
||||
@@ -46,13 +47,6 @@ namespace OpenVulkano
|
||||
vk::Rect2D fullscreenScissor;
|
||||
std::vector<vk::Semaphore> imageAvailableSemaphores;
|
||||
uint32_t currentSemaphoreId = 0;
|
||||
bool useVsync = false;
|
||||
|
||||
#ifdef __APPLE__
|
||||
uint32_t preferredImageCount = 3; //TODO add option
|
||||
#else
|
||||
uint32_t preferredImageCount = 2; //TODO add option
|
||||
#endif
|
||||
vk::Extent2D size{0,0};
|
||||
|
||||
public:
|
||||
@@ -99,13 +93,6 @@ namespace OpenVulkano
|
||||
}
|
||||
}
|
||||
|
||||
[[nodiscard]] bool UseVsync() const { return useVsync; }
|
||||
|
||||
void SetVsync(bool vsync)
|
||||
{ //TODO change swap chain
|
||||
this->useVsync = vsync;
|
||||
}
|
||||
|
||||
[[nodiscard]] uint32_t GetImageCount() const
|
||||
{
|
||||
return images.size();
|
||||
|
||||
Reference in New Issue
Block a user