Changes to build on macOS and animate frames

This commit is contained in:
Stephen Saunders 2021-09-10 01:23:49 -04:00
parent 0dc33496df
commit 2349738013
11 changed files with 267 additions and 107 deletions

View file

@ -8,6 +8,8 @@
#include "VulkanTools.h"
#if !(defined(VK_USE_PLATFORM_IOS_MVK) || defined(VK_USE_PLATFORM_MACOS_MVK))
// iOS & macOS: VulkanExampleBase::getAssetPath() implemented externally to allow access to Objective-C components
const std::string getAssetPath()
{
#if defined(VK_USE_PLATFORM_ANDROID_KHR)
@ -18,6 +20,7 @@ const std::string getAssetPath()
return "./../data/";
#endif
}
#endif
namespace vks
{

View file

@ -102,7 +102,7 @@ private:
bool resizing = false;
void windowResize();
void handleMouseMove(int32_t x, int32_t y);
void nextFrame();
// void nextFrame(); // SRS - make VulkanExampleBase::nextFrame() public
void updateOverlay();
void createPipelineCache();
void createCommandPool();
@ -401,7 +401,9 @@ public:
/** @brief Presents the current image to the swap chain */
void submitFrame();
/** @brief (Virtual) Default image acquire + submission and command buffer submission function */
virtual void renderFrame();
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
/** @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);