Skip to content

Commit 11c3875

Browse files
Merge pull request #1234 from SRSaunders/mvk-base-fixes
Update Apple iOS sub-project to support vulkanexamplebase changes
2 parents 36552a2 + 96ff6b7 commit 11c3875

File tree

4 files changed

+2
-10
lines changed

4 files changed

+2
-10
lines changed

apple/MVKExample.cpp

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -9,10 +9,6 @@
99
#include "MVKExample.h"
1010
#include "examples.h"
1111

12-
void MVKExample::renderFrame() {
13-
_vulkanExample->renderFrame();
14-
}
15-
1612
void MVKExample::displayLinkOutputCb() { // SRS - expose VulkanExampleBase::displayLinkOutputCb() to DemoViewController
1713
_vulkanExample->displayLinkOutputCb();
1814
}
@@ -26,7 +22,6 @@ void MVKExample::keyPressed(uint32_t keyChar) { // SRS - handle keyboard key
2622
case KEY_1: // SRS - support keyboards with no function keys
2723
case KEY_F1:
2824
_vulkanExample->ui.visible = !_vulkanExample->ui.visible;
29-
_vulkanExample->ui.updated = true;
3025
break;
3126
default:
3227
_vulkanExample->keyPressed(keyChar);
@@ -112,7 +107,6 @@ void MVKExample::mouseDragged(double x, double y) {
112107

113108
void MVKExample::scrollWheel(short wheelDelta) {
114109
_vulkanExample->camera.translate(glm::vec3(0.0f, 0.0f, wheelDelta * 0.05f * _vulkanExample->camera.movementSpeed));
115-
_vulkanExample->viewUpdated = true;
116110
}
117111

118112
void MVKExample::fullScreen(bool fullscreen) {

apple/MVKExample.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,6 @@
1313
class MVKExample {
1414

1515
public:
16-
void renderFrame();
1716
void displayLinkOutputCb(); // SRS - expose VulkanExampleBase::displayLinkOutputCb() to DemoViewController
1817

1918
void keyPressed(uint32_t keyChar); // SRS - expose keyboard events to DemoViewController

apple/examples.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@
4040
# include "../examples/triangle/triangle.cpp"
4141
#endif
4242

43-
// Does not run. MoltenVK does not yet support Vulkan 1.3
43+
// Supported as of MoltenVK version 1.3.0 / Vulkan SDK 1.4.321.0
4444
#ifdef MVK_trianglevulkan13
4545
# include "../examples/trianglevulkan13/trianglevulkan13.cpp"
4646
#endif

apple/macos/DemoViewController.mm

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,8 +26,7 @@ static CVReturn DisplayLinkCallback(CVDisplayLinkRef displayLink,
2626
CVOptionFlags flagsIn,
2727
CVOptionFlags* flagsOut,
2828
void* target) {
29-
//((MVKExample*)target)->renderFrame();
30-
((MVKExample*)target)->displayLinkOutputCb(); // SRS - Call displayLinkOutputCb() to animate frames vs. renderFrame() for static image
29+
((MVKExample*)target)->displayLinkOutputCb(); // SRS - Call displayLinkOutputCb() to render/animate at displayLink frame rate
3130
return kCVReturnSuccess;
3231
}
3332

0 commit comments

Comments
 (0)