SDEngine
Game Engine
Loading...
Searching...
No Matches
utils.hpp File Reference
#include <expected>
#include <filesystem>
#include <limits>
#include <stb_image.h>
#include <vulkan/vulkan.hpp>
#include "SD/core/base.hpp"
#include "SD/core/vulkan/vulkan_utils.hpp"
+ Include dependency graph for utils.hpp:
+ This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  sd::Texture
 

Namespaces

namespace  engine
 Namespace for Engine intrinsic things.
 
namespace  sd
 

Macros

#define VK_CHECK(x)
 

Functions

std::expected< void, std::string > sd::single_time_command (const vk::Device &device, const vk::Queue &queue, const vk::CommandPool &command_pool, const std::function< void(const vk::CommandBuffer &)> &action)
 
std::pair< vk::UniqueBuffer, vk::UniqueDeviceMemory > sd::create_buffer (const vk::Device &device, const vk::PhysicalDevice &physical_device, vk::DeviceSize size, vk::BufferUsageFlags usage, vk::MemoryPropertyFlags properties)
 
std::pair< vk::UniqueImage, vk::UniqueDeviceMemory > sd::create_image (const vk::Device &device, const vk::PhysicalDevice &physical_device, uint32_t width, uint32_t height, vk::Format format, vk::ImageTiling tiling, vk::ImageUsageFlags usage, vk::MemoryPropertyFlags properties)
 
void sd::copy_buffer_to_image (const vk::CommandBuffer &cmd_buffer, const vk::Buffer &buffer, const vk::Image &image, uint32_t width, uint32_t height)
 
void sd::transition_image_layout (const vk::CommandBuffer &cmd_buffer, const vk::Image &image, vk::Format format, vk::ImageLayout old_layout, vk::ImageLayout new_layout)
 
std::expected< Texture, std::string > sd::create_texture (const vk::Device &device, const vk::PhysicalDevice &physical_device, const vk::Queue &graphics_queue, const vk::CommandPool &command_pool, const std::filesystem::path &file_path)
 
vk::UniqueShaderModule sd::create_shader_module (const vk::Device &device, const std::vector< char > &code)
 

Macro Definition Documentation

◆ VK_CHECK

#define VK_CHECK (   x)
Value:
do { \
VkResult res = (x); \
engine_abort("Vulkan error: " #x); \
} while (0)
constexpr T g_type_max
Definition types.hpp:21