mirror of
https://github.com/slendidev/lunar.git
synced 2026-01-30 16:28:58 +02:00
32
src/Skybox.h
Normal file
32
src/Skybox.h
Normal 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
|
||||
Reference in New Issue
Block a user