mirror of
https://github.com/antopilo/Nuake.git
synced 2026-09-21 20:08:40 +03:00
Merge branch 'vulkan-dev' of https://github.com/antopilo/Nuake into vulkan-dev
This commit is contained in:
@@ -50,6 +50,13 @@ namespace Nuake {
|
||||
return static_cast<int>(std::chrono::system_clock::now().time_since_epoch().count());
|
||||
}
|
||||
|
||||
void OS::ShowMessageBox(const std::string& title, const std::string& message)
|
||||
{
|
||||
#ifdef NK_WIN
|
||||
::MessageBoxA(nullptr, message.c_str(), title.c_str(), MB_OK);
|
||||
#endif
|
||||
}
|
||||
|
||||
void OS::OpenIn(const std::string& filePath)
|
||||
{
|
||||
#ifdef NK_WIN
|
||||
|
||||
@@ -11,6 +11,7 @@ namespace Nuake
|
||||
static void CopyToClipboard(const std::string& value);
|
||||
static std::string GetFromClipboard();
|
||||
static int GetTime();
|
||||
static void ShowMessageBox(const std::string& title, const std::string& message);
|
||||
static void OpenIn(const std::string& filePath);
|
||||
static void ExecuteCommand(const std::string& command);
|
||||
static int RenameFile(const Ref<File>& file, const std::string& newName);
|
||||
|
||||
@@ -23,6 +23,8 @@
|
||||
|
||||
#include "DescriptorLayoutBuilder.h"
|
||||
|
||||
#include "Nuake/Core/OS.h"
|
||||
|
||||
#include "imgui/imgui.h"
|
||||
#include "imgui/imgui_impl_vulkan.h"
|
||||
#include "imgui/imgui_impl_glfw.h"
|
||||
@@ -208,6 +210,17 @@ void VkRenderer::SelectGPU()
|
||||
auto systemInfoRet = vkb::SystemInfo::get_system_info();
|
||||
auto& systemInfo = systemInfoRet.value();
|
||||
|
||||
for (auto extension : requiredExtensions)
|
||||
{
|
||||
if (!systemInfo.is_extension_available(extension))
|
||||
{
|
||||
std::string errMessage = "No GPU found who supports the required Vulkan extension: " + std::string(extension);
|
||||
errMessage += "\nConsider updating drivers.";
|
||||
Logger::Log(errMessage, "vulkan", CRITICAL);
|
||||
OS::ShowMessageBox("Vulkan Error", errMessage);
|
||||
}
|
||||
}
|
||||
|
||||
vkb::PhysicalDeviceSelector selector{ VkbInstance };
|
||||
vkb::PhysicalDevice physicalDevice = selector
|
||||
.set_minimum_version(1, 3)
|
||||
|
||||
Reference in New Issue
Block a user