Replace the OpenGL rendering backend with Vulkan across the engine: - Graphics: add VulkanContext (instance/device/swapchain/renderpass with depth-stencil), port Canvas to nanovg-on-Vulkan and DebugGUI to the imgui Vulkan backend, drop GLEW. Wait for the Wayland configure handshake before the first present and rebuild the swapchain to the confirmed size so the window maps reliably on fractional-scale outputs. - RasterRender: reimplement RenderBuffer, shaders and object pipeline on Vulkan (offscreen VkImage target with MSAA resolve, SPIR-V pipelines, push-constant MVP, depth remap for Vulkan clip space). - Sketch3D: port the stroke renderer (geometry-shader line expansion) and stroke GPU buffers to Vulkan. - 3DEditor: port the path-tracer texture upload to a Vulkan staging upload and keep raster/path-tracer viewports oriented consistently. - Add a nanovg external-VkImage bridge plus a render-target registry so 3D render targets can be shown inside the 2D canvas. - Prefer the Wayland platform in GLFW regardless of DISPLAY. - Widgets: make BasicLayout size distribution converge with a sub-pixel epsilon instead of an exact-zero comparison, which could otherwise spin forever on fractional-scale displays and block the first frame. Vendor nanovg_vulkan and add a standalone VulkanGraphics module.
19 lines
No EOL
883 B
C++
19 lines
No EOL
883 B
C++
#pragma once
|
|
|
|
#include "VulkanInterface.hpp"
|
|
|
|
#include <vector>
|
|
#include <functional>
|
|
|
|
using PhysicalDevicePickPolicy = std::function<bool(VkPhysicalDevice device)>;
|
|
using QueuePickPolicy = std::function<bool(VkQueueFamilyProperties queue, uint32_t index)>;
|
|
|
|
bool checkValidationLayerSupport(const std::vector<const char *>& validationLayers);
|
|
bool checkDeviceExtensions(VkPhysicalDevice device, const std::vector<const char *>& deviceExtensions);
|
|
|
|
int findQueueFamilyIndex(VkPhysicalDevice physicalDevice, const QueuePickPolicy& pickPolicy);
|
|
|
|
uint32_t findMemoryType(VkPhysicalDevice physicalDevice, uint32_t typeFilter, VkMemoryPropertyFlags flags);
|
|
|
|
VkInstance createInstance(const char ** instanceExtensions, uint32_t extensionsCount, uint32_t apiVersion = VK_API_VERSION_1_0);
|
|
VkPhysicalDevice pickPhysicalDevice(VkInstance instance, const PhysicalDevicePickPolicy& pickPolicy); |