Add skybox

Signed-off-by: Slendi <slendi@socopon.com>
This commit is contained in:
2026-01-11 15:01:48 +02:00
parent 979dab81b1
commit e55601b5a6
8 changed files with 508 additions and 86 deletions

32
src/Skybox.h Normal file
View File

@@ -0,0 +1,32 @@
#pragma once
#include <cstdint>
#include <filesystem>
#include <vulkan/vulkan.hpp>
#include "Pipeline.h"
#include "Types.h"
#include "VulkanRenderer.h"
namespace Lunar {
struct Skybox {
bool ok { false };
auto init(VulkanRenderer &renderer, std::filesystem::path const &path)
-> void;
auto destroy(VulkanRenderer &renderer) -> void;
auto draw(VulkanRenderer::GL &gl, smath::Mat4 const &mvp) -> void;
private:
Pipeline m_pipeline {};
GPUMeshBuffers m_cube_mesh {};
AllocatedImage m_cubemap {};
vk::UniqueSampler m_sampler {};
vk::UniqueDescriptorPool m_descriptor_pool {};
vk::DescriptorSet m_descriptor_set {};
uint32_t m_index_count { 0 };
};
} // namespace Lunar