From 099fccaebfeaa683680b4333626effef5a90692e Mon Sep 17 00:00:00 2001 From: hyzboy Date: Fri, 24 Sep 2021 00:53:59 +0800 Subject: [PATCH] added textures loss check. --- example/Vulkan/InlineGeometryScene.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/example/Vulkan/InlineGeometryScene.cpp b/example/Vulkan/InlineGeometryScene.cpp index ff33cc09..37e57b59 100644 --- a/example/Vulkan/InlineGeometryScene.cpp +++ b/example/Vulkan/InlineGeometryScene.cpp @@ -93,6 +93,10 @@ private: texture.color =db->LoadTexture2D(OS_TEXT("res/image/Brickwall/Albedo.Tex2D"),true); texture.normal =db->LoadTexture2D(OS_TEXT("res/image/Brickwall/Normal.Tex2D"),true); + if(!texture.color + ||!texture.normal) + return(false); + VkSamplerCreateInfo sampler_create_info= { VK_STRUCTURE_TYPE_SAMPLER_CREATE_INFO,