
.. _program_listing_file_Src_GraphicsEngineVulkan_scene_sky_box_SkyBox.ixx:

Program Listing for File SkyBox.ixx
===================================

|exhale_lsh| :ref:`Return to documentation for file <file_Src_GraphicsEngineVulkan_scene_sky_box_SkyBox.ixx>` (``Src/GraphicsEngineVulkan/scene/sky_box/SkyBox.ixx``)

.. |exhale_lsh| unicode:: U+021B0 .. UPWARDS ARROW WITH TIP LEFTWARDS

.. code-block:: cpp

   module;
   
   #include <glm/glm.hpp>
   #include <memory>
   #include <vector>
   #include <vulkan/vulkan.hpp>
   
   export module kataglyphis.vulkan.sky_box;
   
   import kataglyphis.vulkan.device;
   import kataglyphis.vulkan.texture;
   import kataglyphis.vulkan.mesh;
   
   export namespace Kataglyphis {
   class SkyBox
   {
     public:
       SkyBox();
   
       void init(std::shared_ptr<VulkanDevice>device, vk::CommandPool commandPool);
   
       void recordCommands(vk::CommandBuffer &commandBuffer, uint32_t image_index, const std::vector<vk::DescriptorSet> &descriptorSets);
   
       void cleanUp();
   
       Kataglyphis::Texture* getCubeMapTexture() { return cubeMapTexture.get(); }
       Kataglyphis::Mesh* getMesh() { return skyMesh.get(); }
   
       ~SkyBox();
   
     private:
       std::shared_ptr<VulkanDevice>device{ nullptr };
   
       std::unique_ptr<Kataglyphis::Mesh> skyMesh;
       std::unique_ptr<Kataglyphis::Texture> cubeMapTexture;
   
       void loadCubeMap(vk::CommandPool commandPool);
       void createMesh(vk::CommandPool commandPool);
   };
   }
