Code cleanup

Comments
This commit is contained in:
Sascha Willems 2023-12-28 20:37:39 +01:00
parent ac957ef8af
commit 165e20db9e
7 changed files with 16 additions and 13 deletions

View file

@ -157,7 +157,6 @@ void VulkanSwapChain::initSurface(screen_context_t screen_context, screen_window
vks::tools::exitFatal("Could not find a graphics and/or presenting queue!", -1); vks::tools::exitFatal("Could not find a graphics and/or presenting queue!", -1);
} }
// todo : Add support for separate graphics and presenting queue
if (graphicsQueueNodeIndex != presentQueueNodeIndex) if (graphicsQueueNodeIndex != presentQueueNodeIndex)
{ {
vks::tools::exitFatal("Separate graphics and presenting queues are not supported yet!", -1); vks::tools::exitFatal("Separate graphics and presenting queues are not supported yet!", -1);

View file

@ -6,6 +6,13 @@
* This code is licensed under the MIT license (MIT) (http://opensource.org/licenses/MIT) * This code is licensed under the MIT license (MIT) (http://opensource.org/licenses/MIT)
*/ */
/*
* Note that this isn't a complete glTF loader and not all features of the glTF 2.0 spec are supported
* For details on how glTF 2.0 works, see the official spec at https://github.com/KhronosGroup/glTF/tree/master/specification/2.0
*
* If you are looking for a complete glTF implementation, check out https://github.com/SaschaWillems/Vulkan-glTF-PBR/
*/
#define TINYGLTF_IMPLEMENTATION #define TINYGLTF_IMPLEMENTATION
#define STB_IMAGE_IMPLEMENTATION #define STB_IMAGE_IMPLEMENTATION
#define TINYGLTF_NO_STB_IMAGE_WRITE #define TINYGLTF_NO_STB_IMAGE_WRITE
@ -1215,7 +1222,6 @@ void vkglTF::Model::loadFromFile(std::string filename, vks::VulkanDevice *device
} }
} }
else { else {
// TODO: throw
vks::tools::exitFatal("Could not load glTF file \"" + filename + "\": " + error, -1); vks::tools::exitFatal("Could not load glTF file \"" + filename + "\": " + error, -1);
return; return;
} }

View file

@ -6,6 +6,13 @@
* This code is licensed under the MIT license (MIT) (http://opensource.org/licenses/MIT) * This code is licensed under the MIT license (MIT) (http://opensource.org/licenses/MIT)
*/ */
/*
* Note that this isn't a complete glTF loader and not all features of the glTF 2.0 spec are supported
* For details on how glTF 2.0 works, see the official spec at https://github.com/KhronosGroup/glTF/tree/master/specification/2.0
*
* If you are looking for a complete glTF implementation, check out https://github.com/SaschaWillems/Vulkan-glTF-PBR/
*/
#pragma once #pragma once
#include <stdlib.h> #include <stdlib.h>

View file

@ -670,8 +670,6 @@ public:
void updateComputeUBO() void updateComputeUBO()
{ {
if (!paused) { if (!paused) {
//compute.ubo.deltaT = 0.000005f;
// todo: base on frametime
// SRS - Clamp frameTimer to max 20ms refresh period (e.g. if blocked on resize), otherwise image breakup can occur // SRS - Clamp frameTimer to max 20ms refresh period (e.g. if blocked on resize), otherwise image breakup can occur
compute.ubo.deltaT = fmin(frameTimer, 0.02f) * 0.0025f; compute.ubo.deltaT = fmin(frameTimer, 0.02f) * 0.0025f;

View file

@ -1,8 +1,6 @@
/* /*
* Vulkan Example - Order Independent Transparency rendering * Vulkan Example - Order Independent Transparency rendering
* *
* Note: Requires the separate asset pack (see data/README.md)
*
* Copyright by Sascha Willems - www.saschawillems.de * Copyright by Sascha Willems - www.saschawillems.de
* Copyright by Daemyung Jang - dm86.jang@gmail.com * Copyright by Daemyung Jang - dm86.jang@gmail.com
* *

View file

@ -1,9 +1,7 @@
/* /*
* Vulkan Example - Physical based rendering with image based lighting * Vulkan Example - Physical based rendering with image based lighting
* *
* Note: Requires the separate asset pack (see data/README.md) * Copyright (C) 2016-2023 by Sascha Willems - www.saschawillems.de
*
* Copyright (C) 2016-2017 by Sascha Willems - www.saschawillems.de
* *
* This code is licensed under the MIT license (MIT) (http://opensource.org/licenses/MIT) * This code is licensed under the MIT license (MIT) (http://opensource.org/licenses/MIT)
*/ */
@ -548,7 +546,6 @@ public:
vkQueueWaitIdle(queue); vkQueueWaitIdle(queue);
// todo: cleanup
vkDestroyPipeline(device, pipeline, nullptr); vkDestroyPipeline(device, pipeline, nullptr);
vkDestroyPipelineLayout(device, pipelinelayout, nullptr); vkDestroyPipelineLayout(device, pipelinelayout, nullptr);
vkDestroyRenderPass(device, renderpass, nullptr); vkDestroyRenderPass(device, renderpass, nullptr);

View file

@ -1,9 +1,7 @@
/* /*
* Vulkan Example - Physical based rendering a textured object (metal/roughness workflow) with image based lighting * Vulkan Example - Physical based rendering a textured object (metal/roughness workflow) with image based lighting
* *
* Note: Requires the separate asset pack (see data/README.md) * Copyright (C) 2016-2023 by Sascha Willems - www.saschawillems.de
*
* Copyright (C) 2016-2017 by Sascha Willems - www.saschawillems.de
* *
* This code is licensed under the MIT license (MIT) (http://opensource.org/licenses/MIT) * This code is licensed under the MIT license (MIT) (http://opensource.org/licenses/MIT)
*/ */