diff --git a/base/vulkanexamplebase.h b/base/vulkanexamplebase.h index 2b6eb03c..14644f6b 100644 --- a/base/vulkanexamplebase.h +++ b/base/vulkanexamplebase.h @@ -102,7 +102,7 @@ private: bool resizing = false; void windowResize(); void handleMouseMove(int32_t x, int32_t y); -// void nextFrame(); // SRS - make VulkanExampleBase::nextFrame() public + void nextFrame(); void updateOverlay(); void createPipelineCache(); void createCommandPool(); @@ -401,9 +401,7 @@ public: /** @brief Presents the current image to the swap chain */ void submitFrame(); /** @brief (Virtual) Default image acquire + submission and command buffer submission function */ - void renderFrame(); // SRS - Don't think this needs to be virtual since render() is virtual - /** @brief Draws and advances to the next frame */ - void nextFrame(); // SRS - make VulkanExampleBase::nextFrame() public + virtual void renderFrame(); /** @brief (Virtual) Called when the UI overlay is updating, can be used to add custom elements to the overlay */ virtual void OnUpdateUIOverlay(vks::UIOverlay *overlay); diff --git a/xcode/MVKExample.cpp b/xcode/MVKExample.cpp index 5b00eacc..4ecf8f3e 100644 --- a/xcode/MVKExample.cpp +++ b/xcode/MVKExample.cpp @@ -13,8 +13,8 @@ void MVKExample::renderFrame() { _vulkanExample->renderFrame(); } -void MVKExample::nextFrame() { // SRS - expose VulkanExampleBase::nextFrame() to DemoViewController - _vulkanExample->nextFrame(); +void MVKExample::displayLinkOutputCb() { // SRS - expose VulkanExampleBase::displayLinkOutputCb() to DemoViewController + _vulkanExample->displayLinkOutputCb(); } void MVKExample::keyPressed(uint32_t keyCode) { diff --git a/xcode/MVKExample.h b/xcode/MVKExample.h index dd03e713..f926d529 100644 --- a/xcode/MVKExample.h +++ b/xcode/MVKExample.h @@ -14,7 +14,7 @@ class MVKExample { public: void renderFrame(); - void nextFrame(); // SRS - expose VulkanExampleBase::nextFrame() to DemoViewController + void displayLinkOutputCb(); // SRS - expose VulkanExampleBase::displayLinkOutputCb() to DemoViewController void keyPressed(uint32_t keyCode); MVKExample(void* view); diff --git a/xcode/macos/DemoViewController.mm b/xcode/macos/DemoViewController.mm index f08ded77..15f7dbc0 100644 --- a/xcode/macos/DemoViewController.mm +++ b/xcode/macos/DemoViewController.mm @@ -22,7 +22,7 @@ static CVReturn DisplayLinkCallback(CVDisplayLinkRef displayLink, CVOptionFlags* flagsOut, void* target) { //((MVKExample*)target)->renderFrame(); - ((MVKExample*)target)->nextFrame(); // SRS - Call MVKExample::nextFrame() to animate frames vs. MVKExample::renderFrame() for static image + ((MVKExample*)target)->displayLinkOutputCb(); // SRS - Call MVKExample::displayLinkOutputCb() to animate frames vs. MVKExample::renderFrame() for static image return kCVReturnSuccess; }