documentation
This commit is contained in:
parent
cb500f5eda
commit
3275eb2f70
135 changed files with 15649 additions and 430 deletions
49
src/module/Crafter.Graphics-VulkanDevice.cppm
Normal file
49
src/module/Crafter.Graphics-VulkanDevice.cppm
Normal file
|
|
@ -0,0 +1,49 @@
|
|||
/*
|
||||
Crafter®.Graphics
|
||||
Copyright (C) 2025 Catcrafts®
|
||||
Catcrafts.net
|
||||
|
||||
This library is free software; you can redistribute it and/or
|
||||
modify it under the terms of the GNU Lesser General Public
|
||||
License as published by the Free Software Foundation; either
|
||||
version 3.0 of the License, or (at your option) any later version.
|
||||
|
||||
This library is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
Lesser General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU Lesser General Public
|
||||
License along with this library; if not, write to the Free Software
|
||||
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
*/
|
||||
|
||||
module;
|
||||
|
||||
#include <cstdint>
|
||||
#include <vulkan/vulkan.h>
|
||||
#include <vulkan/vulkan_wayland.h>
|
||||
|
||||
export module Crafter.Graphics:VulkanDevice;
|
||||
|
||||
export namespace Crafter {
|
||||
class VulkanDevice {
|
||||
public:
|
||||
inline static VkInstance instance = VK_NULL_HANDLE;
|
||||
inline static VkDebugUtilsMessengerEXT debugMessenger = VK_NULL_HANDLE;
|
||||
inline static VkPhysicalDevice physDevice = VK_NULL_HANDLE;
|
||||
inline static VkDevice device = VK_NULL_HANDLE;
|
||||
inline static std::uint32_t queueFamilyIndex = 0;
|
||||
inline static VkQueue queue = VK_NULL_HANDLE;
|
||||
inline static VkCommandPool commandPool = VK_NULL_HANDLE;
|
||||
inline static VkSwapchainKHR swapchain = VK_NULL_HANDLE;
|
||||
inline static PFN_vkCmdDrawMeshTasksEXT vkCmdDrawMeshTasksEXTProc;
|
||||
inline static PFN_vkCmdBeginRenderingKHR vkCmdBeginRenderingKHRProc;
|
||||
inline static PFN_vkCmdEndRenderingKHR vkCmdEndRenderingKHRProc;
|
||||
inline static VkPhysicalDeviceMemoryProperties memoryProperties;
|
||||
inline static VkFormat depthFormat = VK_FORMAT_UNDEFINED;
|
||||
static void CreateDevice();
|
||||
static void CHECK_VK_RESULT(VkResult result);
|
||||
static std::uint32_t GetMemoryType(std::uint32_t typeBits, VkMemoryPropertyFlags properties);
|
||||
};
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue