mirror of
https://github.com/ocornut/imgui.git
synced 2024-11-24 05:19:02 +08:00
Examples: Vulkan: Switch validation layer. Fix CMakeLists to find Vulkan the standard way. (#3459)
This commit is contained in:
parent
751d153ca9
commit
b25756be4a
@ -63,6 +63,8 @@ Other Changes:
|
||||
- Metrics: Various tweaks, listing windows front-to-back, greying inactive items when possible.
|
||||
- Demo: Add simple InputText() callbacks demo (aside from the more elaborate ones in 'Examples->Console').
|
||||
- Examples: Vulkan: Reworked buffer resize handling, fix for Linux/X11. (#3390, #2626) [@RoryO]
|
||||
- Examples: Vulkan: Switch validation layer to use "VK_LAYER_KHRONOS_validation" instead of
|
||||
"VK_LAYER_LUNARG_standard_validation" which is deprecated (#3459) [@FunMiles]
|
||||
|
||||
|
||||
-----------------------------------------------------------------------
|
||||
|
@ -28,9 +28,11 @@ set(IMGUI_DIR ../../)
|
||||
include_directories(${IMGUI_DIR} ..)
|
||||
|
||||
# Libraries
|
||||
find_library(VULKAN_LIBRARY
|
||||
NAMES vulkan vulkan-1)
|
||||
set(LIBRARIES "glfw;${VULKAN_LIBRARY}")
|
||||
find_package(Vulkan REQUIRED)
|
||||
#find_library(VULKAN_LIBRARY
|
||||
#NAMES vulkan vulkan-1)
|
||||
#set(LIBRARIES "glfw;${VULKAN_LIBRARY}")
|
||||
set(LIBRARIES "glfw;Vulkan::Vulkan")
|
||||
|
||||
# Use vulkan headers from glfw:
|
||||
include_directories(${GLFW_DIR}/deps)
|
||||
|
@ -72,10 +72,9 @@ static void SetupVulkan(const char** extensions, uint32_t extensions_count)
|
||||
create_info.sType = VK_STRUCTURE_TYPE_INSTANCE_CREATE_INFO;
|
||||
create_info.enabledExtensionCount = extensions_count;
|
||||
create_info.ppEnabledExtensionNames = extensions;
|
||||
|
||||
#ifdef IMGUI_VULKAN_DEBUG_REPORT
|
||||
// Enabling multiple validation layers grouped as LunarG standard validation
|
||||
const char* layers[] = { "VK_LAYER_LUNARG_standard_validation" };
|
||||
// Enabling validation layers
|
||||
const char* layers[] = { "VK_LAYER_KHRONOS_validation" };
|
||||
create_info.enabledLayerCount = 1;
|
||||
create_info.ppEnabledLayerNames = layers;
|
||||
|
||||
|
@ -64,10 +64,9 @@ static void SetupVulkan(const char** extensions, uint32_t extensions_count)
|
||||
create_info.sType = VK_STRUCTURE_TYPE_INSTANCE_CREATE_INFO;
|
||||
create_info.enabledExtensionCount = extensions_count;
|
||||
create_info.ppEnabledExtensionNames = extensions;
|
||||
|
||||
#ifdef IMGUI_VULKAN_DEBUG_REPORT
|
||||
// Enabling multiple validation layers grouped as LunarG standard validation
|
||||
const char* layers[] = { "VK_LAYER_LUNARG_standard_validation" };
|
||||
// Enabling validation layers
|
||||
const char* layers[] = { "VK_LAYER_KHRONOS_validation" };
|
||||
create_info.enabledLayerCount = 1;
|
||||
create_info.ppEnabledLayerNames = layers;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user