mirror of
				https://github.com/Drezil/imgui.git
				synced 2025-11-04 07:01:04 +01:00 
			
		
		
		
	Examples: Vulkan: Switch validation layer. Fix CMakeLists to find Vulkan the standard way. (#3459)
This commit is contained in:
		@@ -63,6 +63,8 @@ Other Changes:
 | 
				
			|||||||
- Metrics: Various tweaks, listing windows front-to-back, greying inactive items when possible.
 | 
					- 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').
 | 
					- 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: 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} ..)
 | 
					include_directories(${IMGUI_DIR} ..)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
# Libraries
 | 
					# Libraries
 | 
				
			||||||
find_library(VULKAN_LIBRARY
 | 
					find_package(Vulkan REQUIRED)
 | 
				
			||||||
  NAMES vulkan vulkan-1)
 | 
					#find_library(VULKAN_LIBRARY
 | 
				
			||||||
set(LIBRARIES "glfw;${VULKAN_LIBRARY}")
 | 
					  #NAMES vulkan vulkan-1)
 | 
				
			||||||
 | 
					#set(LIBRARIES "glfw;${VULKAN_LIBRARY}")
 | 
				
			||||||
 | 
					set(LIBRARIES "glfw;Vulkan::Vulkan")
 | 
				
			||||||
 | 
					
 | 
				
			||||||
# Use vulkan headers from glfw:
 | 
					# Use vulkan headers from glfw:
 | 
				
			||||||
include_directories(${GLFW_DIR}/deps)
 | 
					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.sType = VK_STRUCTURE_TYPE_INSTANCE_CREATE_INFO;
 | 
				
			||||||
        create_info.enabledExtensionCount = extensions_count;
 | 
					        create_info.enabledExtensionCount = extensions_count;
 | 
				
			||||||
        create_info.ppEnabledExtensionNames = extensions;
 | 
					        create_info.ppEnabledExtensionNames = extensions;
 | 
				
			||||||
 | 
					 | 
				
			||||||
#ifdef IMGUI_VULKAN_DEBUG_REPORT
 | 
					#ifdef IMGUI_VULKAN_DEBUG_REPORT
 | 
				
			||||||
        // Enabling multiple validation layers grouped as LunarG standard validation
 | 
					        // Enabling validation layers
 | 
				
			||||||
        const char* layers[] = { "VK_LAYER_LUNARG_standard_validation" };
 | 
					        const char* layers[] = { "VK_LAYER_KHRONOS_validation" };
 | 
				
			||||||
        create_info.enabledLayerCount = 1;
 | 
					        create_info.enabledLayerCount = 1;
 | 
				
			||||||
        create_info.ppEnabledLayerNames = layers;
 | 
					        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.sType = VK_STRUCTURE_TYPE_INSTANCE_CREATE_INFO;
 | 
				
			||||||
        create_info.enabledExtensionCount = extensions_count;
 | 
					        create_info.enabledExtensionCount = extensions_count;
 | 
				
			||||||
        create_info.ppEnabledExtensionNames = extensions;
 | 
					        create_info.ppEnabledExtensionNames = extensions;
 | 
				
			||||||
 | 
					 | 
				
			||||||
#ifdef IMGUI_VULKAN_DEBUG_REPORT
 | 
					#ifdef IMGUI_VULKAN_DEBUG_REPORT
 | 
				
			||||||
        // Enabling multiple validation layers grouped as LunarG standard validation
 | 
					        // Enabling validation layers
 | 
				
			||||||
        const char* layers[] = { "VK_LAYER_LUNARG_standard_validation" };
 | 
					        const char* layers[] = { "VK_LAYER_KHRONOS_validation" };
 | 
				
			||||||
        create_info.enabledLayerCount = 1;
 | 
					        create_info.enabledLayerCount = 1;
 | 
				
			||||||
        create_info.ppEnabledLayerNames = layers;
 | 
					        create_info.ppEnabledLayerNames = layers;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user