Revert changes to vulkanexamplebase.h and expose displayLinkOutputCb() to DemoViewController

This commit is contained in:
Stephen Saunders 2021-09-11 11:36:27 -04:00
parent 2349738013
commit 28d98b9ee7
4 changed files with 6 additions and 8 deletions

View file

@ -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) {

View file

@ -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);

View file

@ -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;
}