macOS retina scaling fixes, M1 Vulkan vsync workaround, CMakeLists OpenMP path fix for Apple

This commit is contained in:
Stephen Saunders 2022-06-20 16:44:34 -04:00
parent 279c95422d
commit 8bc8d14cf2
10 changed files with 33 additions and 21 deletions

View file

@ -113,13 +113,14 @@ void MVKExample::fullScreen(bool fullscreen) {
_vulkanExample->settings.fullscreen = fullscreen;
}
MVKExample::MVKExample(void* view) {
MVKExample::MVKExample(void* view, double scaleUI) {
_vulkanExample = new VulkanExample();
_vulkanExample->settings.vsync = true; // SRS - this iOS/macOS example uses displayLink vsync rendering - set before calling prepare()
_vulkanExample->initVulkan();
_vulkanExample->setupWindow(view);
_vulkanExample->settings.vsync = true; // SRS - set vsync flag since this iOS/macOS example app uses displayLink vsync rendering
_vulkanExample->UIOverlay.scale = scaleUI; // SRS - set UIOverlay scale to maintain relative proportions/readability on retina displays
_vulkanExample->prepare();
_vulkanExample->renderLoop(); // SRS - this inits destWidth/destHeight/lastTimestamp/tPrevEnd, then falls through and returns
_vulkanExample->renderLoop(); // SRS - this inits destWidth/destHeight/lastTimestamp/tPrevEnd, then falls through and returns
}
MVKExample::~MVKExample() {