mirror of
https://github.com/antopilo/Nuake.git
synced 2025-12-30 21:49:06 +03:00
Merge branch 'vulkan-dev' of https://github.com/antopilo/Nuake into vulkan-dev
# Conflicts: # Nuake/Source/Nuake/Modules/QuakeModule/Module.lua
This commit is contained in:
@@ -65,7 +65,7 @@
|
||||
|
||||
#include "../Events/EditorRequests.h"
|
||||
#include "../../../../Nuake/Thirdparty/glfw/include/GLFW/glfw3.h"
|
||||
#include "../../../AnimatedValue.h"
|
||||
#include "../misc/AnimatedValue.h"
|
||||
|
||||
namespace Nuake {
|
||||
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
|
||||
#include "IEditorWidget.h"
|
||||
|
||||
#include "../../../../../AnimatedValue.h"
|
||||
#include "../../../misc/AnimatedValue.h"
|
||||
|
||||
namespace Nuake
|
||||
{
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
#include "IEditorWidget.h"
|
||||
#include "../../EditorSelectionPanel.h"
|
||||
|
||||
#include "../../../../../AnimatedValue.h"
|
||||
#include "../../../misc/AnimatedValue.h"
|
||||
|
||||
class EditorContext;
|
||||
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
#include "IEditorWidget.h"
|
||||
|
||||
#include <imgui/ImGuizmo.h>
|
||||
#include "../../../../../AnimatedValue.h"
|
||||
#include "../../../misc/AnimatedValue.h"
|
||||
|
||||
class EditorContext;
|
||||
|
||||
|
||||
@@ -5,7 +5,7 @@ return {
|
||||
-- Place all your sources here
|
||||
sources = {
|
||||
"QuakeModule.cpp",
|
||||
"QuakBaker.h",
|
||||
"QuakeBaker.h",
|
||||
"QuakeBaker.cpp",
|
||||
}
|
||||
}
|
||||
@@ -174,13 +174,19 @@ void VkRenderer::GetInstance()
|
||||
vkb::InstanceBuilder builder;
|
||||
|
||||
//make the vulkan instance, with basic debug features
|
||||
auto inst_ret = builder.set_app_name("Nuake Engine")
|
||||
auto instRet = builder.set_app_name("Nuake Engine")
|
||||
.request_validation_layers(NKUseValidationLayer)
|
||||
.use_default_debug_messenger()
|
||||
.require_api_version(1, 3, 0)
|
||||
.build();
|
||||
|
||||
VkbInstance = inst_ret.value();
|
||||
if (!instRet)
|
||||
{
|
||||
std::string errMsg = "Failed to create Vulkan instance. Error: " + instRet.error().message();
|
||||
OS::ShowMessageBox("Vulkan Error", errMsg);
|
||||
}
|
||||
|
||||
VkbInstance = instRet.value();
|
||||
Instance = VkbInstance.instance;
|
||||
VkDebugMessenger = VkbInstance.debug_messenger;
|
||||
}
|
||||
@@ -218,7 +224,7 @@ void VkRenderer::SelectGPU()
|
||||
}
|
||||
|
||||
vkb::PhysicalDeviceSelector selector{ VkbInstance };
|
||||
vkb::PhysicalDevice physicalDevice = selector
|
||||
auto physRet = selector
|
||||
.set_minimum_version(1, 3)
|
||||
.set_required_features_13(features)
|
||||
.set_required_features_12(features12)
|
||||
@@ -228,8 +234,15 @@ void VkRenderer::SelectGPU()
|
||||
})
|
||||
.set_surface(Surface)
|
||||
.add_required_extensions(requiredExtensions)
|
||||
.select()
|
||||
.value();
|
||||
.select();
|
||||
|
||||
if (!physRet)
|
||||
{
|
||||
auto message = physRet.error().message();
|
||||
OS::ShowMessageBox("Vulkan Error", "No Physical Device supported found. \n" + message);
|
||||
}
|
||||
|
||||
vkb::PhysicalDevice physicalDevice = physRet.value();
|
||||
|
||||
vkb::DeviceBuilder deviceBuilder{ physicalDevice };
|
||||
|
||||
@@ -258,10 +271,18 @@ void VkRenderer::SelectGPU()
|
||||
|
||||
// Chain pNext for Extended Dynamic State 3
|
||||
|
||||
VkbDevice = deviceBuilder
|
||||
auto devRet = deviceBuilder
|
||||
.add_pNext(&line_raster_features)
|
||||
.add_pNext(&extendedDynamicState3Features)
|
||||
.build().value();
|
||||
.build();
|
||||
|
||||
if (!devRet)
|
||||
{
|
||||
auto message = devRet.error().message();
|
||||
OS::ShowMessageBox("Vulkan Error", "No Device supported found.\n" + message);
|
||||
}
|
||||
|
||||
VkbDevice = devRet.value();
|
||||
Device = VkbDevice.device;
|
||||
GPU = physicalDevice.physical_device;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user