From d074fb6456f54677c7ffd5545b1bb4e7b8bdb437 Mon Sep 17 00:00:00 2001 From: hyzboy Date: Wed, 13 Nov 2019 16:01:13 +0800 Subject: [PATCH] =?UTF-8?q?TextureFormat=E6=B5=8B=E8=AF=95=E7=A8=8B?= =?UTF-8?q?=E5=BA=8F=E5=8E=BB=E6=8E=89=E5=A4=9A=E4=BD=99=E7=9A=84=E7=AA=97?= =?UTF-8?q?=E5=8F=A3=E5=88=9B=E5=BB=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- example/Vulkan/TextureFormat.cpp | 16 ++++------------ 1 file changed, 4 insertions(+), 12 deletions(-) diff --git a/example/Vulkan/TextureFormat.cpp b/example/Vulkan/TextureFormat.cpp index 85b70230..82b2b0f1 100644 --- a/example/Vulkan/TextureFormat.cpp +++ b/example/Vulkan/TextureFormat.cpp @@ -54,21 +54,15 @@ int main(int,char **) InitVulkanProperties(); - win=CreateRenderWindow(OS_TEXT("VulkanTest")); - if(!win) - return(false); - - if(!win->Create(128,128)) - return(false); - inst=vulkan::CreateInstance(U8_TEXT("VulkanTest")); if(!inst) return(false); - device=CreateRenderDevice(inst,win); + physical_device=inst->GetDevice(VK_PHYSICAL_DEVICE_TYPE_DISCRETE_GPU); - physical_device=device->GetPhysicalDevice(); + if(!physical_device) + physical_device=inst->GetDevice(VK_PHYSICAL_DEVICE_TYPE_INTEGRATED_GPU); uint32_t count; const VulkanFormat *vf=GetVulkanFormatList(count); @@ -112,9 +106,7 @@ int main(int,char **) ++vf; } - delete device; delete inst; - delete win; - + return 0; } \ No newline at end of file