Revert changes to vulkanexamplebase.h and expose displayLinkOutputCb() to DemoViewController
This commit is contained in:
parent
2349738013
commit
28d98b9ee7
4 changed files with 6 additions and 8 deletions
|
|
@ -102,7 +102,7 @@ private:
|
||||||
bool resizing = false;
|
bool resizing = false;
|
||||||
void windowResize();
|
void windowResize();
|
||||||
void handleMouseMove(int32_t x, int32_t y);
|
void handleMouseMove(int32_t x, int32_t y);
|
||||||
// void nextFrame(); // SRS - make VulkanExampleBase::nextFrame() public
|
void nextFrame();
|
||||||
void updateOverlay();
|
void updateOverlay();
|
||||||
void createPipelineCache();
|
void createPipelineCache();
|
||||||
void createCommandPool();
|
void createCommandPool();
|
||||||
|
|
@ -401,9 +401,7 @@ public:
|
||||||
/** @brief Presents the current image to the swap chain */
|
/** @brief Presents the current image to the swap chain */
|
||||||
void submitFrame();
|
void submitFrame();
|
||||||
/** @brief (Virtual) Default image acquire + submission and command buffer submission function */
|
/** @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
|
virtual void renderFrame();
|
||||||
/** @brief Draws and advances to the next frame */
|
|
||||||
void nextFrame(); // SRS - make VulkanExampleBase::nextFrame() public
|
|
||||||
|
|
||||||
/** @brief (Virtual) Called when the UI overlay is updating, can be used to add custom elements to the overlay */
|
/** @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);
|
virtual void OnUpdateUIOverlay(vks::UIOverlay *overlay);
|
||||||
|
|
|
||||||
|
|
@ -13,8 +13,8 @@ void MVKExample::renderFrame() {
|
||||||
_vulkanExample->renderFrame();
|
_vulkanExample->renderFrame();
|
||||||
}
|
}
|
||||||
|
|
||||||
void MVKExample::nextFrame() { // SRS - expose VulkanExampleBase::nextFrame() to DemoViewController
|
void MVKExample::displayLinkOutputCb() { // SRS - expose VulkanExampleBase::displayLinkOutputCb() to DemoViewController
|
||||||
_vulkanExample->nextFrame();
|
_vulkanExample->displayLinkOutputCb();
|
||||||
}
|
}
|
||||||
|
|
||||||
void MVKExample::keyPressed(uint32_t keyCode) {
|
void MVKExample::keyPressed(uint32_t keyCode) {
|
||||||
|
|
|
||||||
|
|
@ -14,7 +14,7 @@ class MVKExample {
|
||||||
|
|
||||||
public:
|
public:
|
||||||
void renderFrame();
|
void renderFrame();
|
||||||
void nextFrame(); // SRS - expose VulkanExampleBase::nextFrame() to DemoViewController
|
void displayLinkOutputCb(); // SRS - expose VulkanExampleBase::displayLinkOutputCb() to DemoViewController
|
||||||
void keyPressed(uint32_t keyCode);
|
void keyPressed(uint32_t keyCode);
|
||||||
|
|
||||||
MVKExample(void* view);
|
MVKExample(void* view);
|
||||||
|
|
|
||||||
|
|
@ -22,7 +22,7 @@ static CVReturn DisplayLinkCallback(CVDisplayLinkRef displayLink,
|
||||||
CVOptionFlags* flagsOut,
|
CVOptionFlags* flagsOut,
|
||||||
void* target) {
|
void* target) {
|
||||||
//((MVKExample*)target)->renderFrame();
|
//((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;
|
return kCVReturnSuccess;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue