ready for remove swapchain
parent
57e8516d0c
commit
c2b3bbec51
|
@ -110,8 +110,8 @@ void VulkanExampleBase::prepare()
|
||||||
/*
|
/*
|
||||||
Swapchain
|
Swapchain
|
||||||
*/
|
*/
|
||||||
initSwapchain();
|
//initSwapchain();
|
||||||
setupSwapChain();
|
//setupSwapChain();
|
||||||
|
|
||||||
#if defined(VK_USE_PLATFORM_ANDROID_KHR)
|
#if defined(VK_USE_PLATFORM_ANDROID_KHR)
|
||||||
width = swapChain.extent.width;
|
width = swapChain.extent.width;
|
||||||
|
|
Binary file not shown.
|
@ -1992,12 +1992,14 @@ PlumageRender::PlumageRender()
|
||||||
|
|
||||||
|
|
||||||
outputImageSequence();
|
outputImageSequence();
|
||||||
|
imageSequenceToVideo();
|
||||||
VK_CHECK_RESULT(vkWaitForFences(device, 1, &waitFences[frameIndex], VK_TRUE, UINT64_MAX));
|
VK_CHECK_RESULT(vkWaitForFences(device, 1, &waitFences[frameIndex], VK_TRUE, UINT64_MAX));
|
||||||
|
|
||||||
imageSequenceToVideo();
|
|
||||||
VK_CHECK_RESULT(vkResetFences(device, 1, &waitFences[frameIndex]));
|
VK_CHECK_RESULT(vkResetFences(device, 1, &waitFences[frameIndex]));
|
||||||
|
|
||||||
|
|
||||||
|
/*
|
||||||
VkResult acquire = swapChain.acquireNextImage(presentCompleteSemaphores[frameIndex], ¤tBuffer);
|
VkResult acquire = swapChain.acquireNextImage(presentCompleteSemaphores[frameIndex], ¤tBuffer);
|
||||||
if ((acquire == VK_ERROR_OUT_OF_DATE_KHR) || (acquire == VK_SUBOPTIMAL_KHR)) {
|
if ((acquire == VK_ERROR_OUT_OF_DATE_KHR) || (acquire == VK_SUBOPTIMAL_KHR)) {
|
||||||
windowResize();
|
windowResize();
|
||||||
|
@ -2007,6 +2009,7 @@ PlumageRender::PlumageRender()
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
*/
|
||||||
|
|
||||||
// Update UBOs
|
// Update UBOs
|
||||||
updateUniformBuffers();
|
updateUniformBuffers();
|
||||||
|
@ -2015,12 +2018,13 @@ PlumageRender::PlumageRender()
|
||||||
memcpy(currentUB.params.mapped, &shaderData, sizeof(shaderData));
|
memcpy(currentUB.params.mapped, &shaderData, sizeof(shaderData));
|
||||||
memcpy(currentUB.skybox.mapped, &shaderDataSkybox, sizeof(shaderDataSkybox));
|
memcpy(currentUB.skybox.mapped, &shaderDataSkybox, sizeof(shaderDataSkybox));
|
||||||
|
|
||||||
|
|
||||||
const VkPipelineStageFlags waitDstStageMask = VK_PIPELINE_STAGE_COLOR_ATTACHMENT_OUTPUT_BIT;
|
const VkPipelineStageFlags waitDstStageMask = VK_PIPELINE_STAGE_COLOR_ATTACHMENT_OUTPUT_BIT;
|
||||||
VkSubmitInfo submitInfo{};
|
VkSubmitInfo submitInfo{};
|
||||||
submitInfo.sType = VK_STRUCTURE_TYPE_SUBMIT_INFO;
|
submitInfo.sType = VK_STRUCTURE_TYPE_SUBMIT_INFO;
|
||||||
submitInfo.pWaitDstStageMask = &waitDstStageMask;
|
submitInfo.pWaitDstStageMask = &waitDstStageMask;
|
||||||
submitInfo.pWaitSemaphores = &presentCompleteSemaphores[frameIndex];
|
//submitInfo.pWaitSemaphores = &presentCompleteSemaphores[frameIndex];
|
||||||
submitInfo.waitSemaphoreCount = 1;
|
//submitInfo.waitSemaphoreCount = 1;
|
||||||
submitInfo.pSignalSemaphores = &renderCompleteSemaphores[frameIndex];
|
submitInfo.pSignalSemaphores = &renderCompleteSemaphores[frameIndex];
|
||||||
submitInfo.signalSemaphoreCount = 1;
|
submitInfo.signalSemaphoreCount = 1;
|
||||||
submitInfo.pCommandBuffers = &commandBuffers[currentBuffer];
|
submitInfo.pCommandBuffers = &commandBuffers[currentBuffer];
|
||||||
|
@ -2308,7 +2312,7 @@ PlumageRender::PlumageRender()
|
||||||
for (int32_t i = 0; i < __argc; i++) { PlumageRender::args.push_back(__argv[i]); };
|
for (int32_t i = 0; i < __argc; i++) { PlumageRender::args.push_back(__argv[i]); };
|
||||||
plumageRender = new PlumageRender();
|
plumageRender = new PlumageRender();
|
||||||
plumageRender->initVulkan();
|
plumageRender->initVulkan();
|
||||||
plumageRender->setupWindow(hInstance, WndProc);
|
//plumageRender->setupWindow(hInstance, WndProc);
|
||||||
plumageRender->prepare();
|
plumageRender->prepare();
|
||||||
plumageRender->renderLoop();
|
plumageRender->renderLoop();
|
||||||
delete(plumageRender);
|
delete(plumageRender);
|
||||||
|
|
|
@ -139,9 +139,9 @@ public:
|
||||||
|
|
||||||
struct FilePath
|
struct FilePath
|
||||||
{ //model path
|
{ //model path
|
||||||
std::string glTFModelFilePath = getAssetPath() + "models/sauvage_perfume.glb";
|
std::string glTFModelFilePath = getAssetPath() + "models/DamagedHelmet/DamagedHelmet.gltf";
|
||||||
std::string modelVertShaderPath = getAssetPath() + "buster_drone/shaders/glsl/mesh.vert.spv";
|
//std::string modelVertShaderPath = getAssetPath() + "buster_drone/shaders/glsl/mesh.vert.spv";
|
||||||
std::string modelFragShaderPath = getAssetPath() + "buster_drone/shaders/glsl/mesh.frag.spv";
|
//std::string modelFragShaderPath = getAssetPath() + "buster_drone/shaders/glsl/mesh.frag.spv";
|
||||||
|
|
||||||
//ui
|
//ui
|
||||||
std::string uiVertShaderPath = getAssetPath() + "shaders/ui.vert.spv";
|
std::string uiVertShaderPath = getAssetPath() + "shaders/ui.vert.spv";
|
||||||
|
@ -152,7 +152,7 @@ public:
|
||||||
std::string skyboxVertShaderPath = getAssetPath() + "shaders/skybox.vert.spv";
|
std::string skyboxVertShaderPath = getAssetPath() + "shaders/skybox.vert.spv";
|
||||||
std::string skyboxFragShaderPath = getAssetPath() + "shaders/skybox.frag.spv";
|
std::string skyboxFragShaderPath = getAssetPath() + "shaders/skybox.frag.spv";
|
||||||
|
|
||||||
std::string iblTexturesFilePath = getAssetPath() + "textures/hdr/gcanyon_cube.ktx";
|
//std::string iblTexturesFilePath = getAssetPath() + "textures/hdr/gcanyon_cube.ktx";
|
||||||
//tonemapping
|
//tonemapping
|
||||||
std::string tonemappingVertShaderPath = getAssetPath() + "buster_drone/shaders/glsl/genbrdflut.vert.spv";
|
std::string tonemappingVertShaderPath = getAssetPath() + "buster_drone/shaders/glsl/genbrdflut.vert.spv";
|
||||||
std::string tonemappingEnableFragShaderPath = getAssetPath() + "buster_drone/shaders/glsl/tonemapping_enable.frag.spv";
|
std::string tonemappingEnableFragShaderPath = getAssetPath() + "buster_drone/shaders/glsl/tonemapping_enable.frag.spv";
|
||||||
|
@ -169,7 +169,7 @@ public:
|
||||||
std::string brdfVertShaderPath = getAssetPath() + "shaders/genbrdflut.vert.spv";
|
std::string brdfVertShaderPath = getAssetPath() + "shaders/genbrdflut.vert.spv";
|
||||||
std::string brdfFragShaderPath = getAssetPath() + "shaders/genbrdflut.frag.spv";
|
std::string brdfFragShaderPath = getAssetPath() + "shaders/genbrdflut.frag.spv";
|
||||||
// environment map texture
|
// environment map texture
|
||||||
std::string envMapFilePath = getAssetPath() + "environments/kloofendal_43d_clear_puresky_hdr16f_cube.ktx";
|
std::string envMapFilePath = getAssetPath() + "environments/metro_noord_4k_hdr16f_cube.ktx";
|
||||||
std::string emptyEnvmapFilePath = getAssetPath() + "textures/empty.ktx";
|
std::string emptyEnvmapFilePath = getAssetPath() + "textures/empty.ktx";
|
||||||
// pbr shader
|
// pbr shader
|
||||||
std::string pbrVertShaderPath = getAssetPath() + "shaders/pbr.vert.spv";
|
std::string pbrVertShaderPath = getAssetPath() + "shaders/pbr.vert.spv";
|
||||||
|
|
Loading…
Reference in New Issue