Fix glTF build & settings issues for macOS, fix triangle example resizing, update macOS examples.h file
(cherry picked from commit 47061ff99446d8826ebe7fe187467ba638236a70)
This commit is contained in:
parent
b1f10d7393
commit
2810087752
7 changed files with 39 additions and 21 deletions
|
|
@ -17,7 +17,7 @@
|
|||
* If you are looking for a complete glTF implementation, check out https://github.com/SaschaWillems/Vulkan-glTF-PBR/
|
||||
*/
|
||||
|
||||
//#define TINYGLTF_IMPLEMENTATION // SRS - Already defined in VulkanglTFModel.cpp
|
||||
#define TINYGLTF_IMPLEMENTATION
|
||||
#define STB_IMAGE_IMPLEMENTATION
|
||||
#define TINYGLTF_NO_STB_IMAGE_WRITE
|
||||
#ifdef VK_USE_PLATFORM_ANDROID_KHR
|
||||
|
|
|
|||
|
|
@ -12,10 +12,10 @@
|
|||
* This sample comes with a tutorial, see the README.md in this folder
|
||||
*/
|
||||
|
||||
//#define TINYGLTF_IMPLEMENTATION // SRS - Already defined in VulkanglTFModel.cpp
|
||||
#define TINYGLTF_IMPLEMENTATION
|
||||
#define STB_IMAGE_IMPLEMENTATION
|
||||
#define TINYGLTF_NO_STB_IMAGE_WRITE
|
||||
#define TINYGLTF_NO_STB_IMAGE
|
||||
//#define TINYGLTF_NO_STB_IMAGE // SRS - Comment out to enable default image loader, otherwise LoadImageData() is undefined
|
||||
#define TINYGLTF_NO_EXTERNAL_IMAGE
|
||||
#ifdef VK_USE_PLATFORM_ANDROID_KHR
|
||||
#define TINYGLTF_ANDROID_LOAD_FROM_ASSETS
|
||||
|
|
|
|||
|
|
@ -27,7 +27,7 @@
|
|||
#include <glm/gtc/matrix_transform.hpp>
|
||||
#include <glm/gtc/type_ptr.hpp>
|
||||
|
||||
//#define TINYGLTF_IMPLEMENTATION // SRS - Already defined in VulkanglTFModel.cpp
|
||||
#define TINYGLTF_IMPLEMENTATION
|
||||
#define STB_IMAGE_IMPLEMENTATION
|
||||
#define TINYGLTF_NO_STB_IMAGE_WRITE
|
||||
#ifdef VK_USE_PLATFORM_ANDROID_KHR
|
||||
|
|
|
|||
|
|
@ -335,7 +335,10 @@ public:
|
|||
void draw()
|
||||
{
|
||||
// Get next image in the swap chain (back/front buffer)
|
||||
VK_CHECK_RESULT(swapChain.acquireNextImage(presentCompleteSemaphore, ¤tBuffer));
|
||||
VkResult acquire = swapChain.acquireNextImage(presentCompleteSemaphore, ¤tBuffer);
|
||||
if (!((acquire == VK_SUCCESS) || (acquire == VK_SUBOPTIMAL_KHR))) {
|
||||
VK_CHECK_RESULT(acquire);
|
||||
}
|
||||
|
||||
// Use a fence to wait until the command buffer has finished execution before using it again
|
||||
VK_CHECK_RESULT(vkWaitForFences(device, 1, &waitFences[currentBuffer], VK_TRUE, UINT64_MAX));
|
||||
|
|
|
|||
|
|
@ -9,7 +9,7 @@
|
|||
#define TINYGLTF_IMPLEMENTATION
|
||||
#define STB_IMAGE_IMPLEMENTATION
|
||||
#define TINYGLTF_NO_STB_IMAGE_WRITE
|
||||
#define TINYGLTF_NO_STB_IMAGE
|
||||
//#define TINYGLTF_NO_STB_IMAGE // SRS - Comment out to enable default image loader, otherwise LoadImageData() is undefined
|
||||
#define TINYGLTF_NO_EXTERNAL_IMAGE
|
||||
#ifdef VK_USE_PLATFORM_ANDROID_KHR
|
||||
#define TINYGLTF_ANDROID_LOAD_FROM_ASSETS
|
||||
|
|
@ -140,4 +140,4 @@ public:
|
|||
void drawSceneNode(VkCommandBuffer commandBuffer, Node node);
|
||||
virtual void render();
|
||||
virtual void OnUpdateUIOverlay(vks::UIOverlay* overlay);
|
||||
};
|
||||
};
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue