hachem.wtf
aboutsummaryrefslogtreecommitdiff
path: root/src/core/hdri_manager.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/core/hdri_manager.h')
-rw-r--r--src/core/hdri_manager.h23
1 files changed, 12 insertions, 11 deletions
diff --git a/src/core/hdri_manager.h b/src/core/hdri_manager.h
index 3bdf1cb..d98830f 100644
--- a/src/core/hdri_manager.h
+++ b/src/core/hdri_manager.h
@@ -12,19 +12,20 @@ namespace Donut
class HDRIManager
{
public:
- static HDRIManager& get()
+ static auto get() -> HDRIManager&
{
static HDRIManager instance;
return instance;
}
- Ref<CubemapTexture> load_hdri(const std::string& path);
- Ref<CubemapTexture> get_current_hdri() const { return m_current_hdri; }
-
- void set_current_hdri(const std::string& path);
- const std::vector<std::string>& get_available_hdri() const { return m_available_hdri; }
- std::string get_hdri_name(const std::string& path) const;
- void clear_cache();
+ auto load_hdri(const std::string& path) -> Ref<CubemapTexture>;
+ auto get_current_hdri() const -> Ref<CubemapTexture> { return m_current_hdri; }
+
+ auto set_current_hdri(const std::string& path) -> void;
+ auto get_available_hdri() const -> const std::vector<std::string>& { return m_available_hdri; }
+ auto get_hdri_name(const std::string& path) const -> std::string;
+ auto clear_cache() -> void;
+
private:
HDRIManager() = default;
~HDRIManager() = default;
@@ -33,10 +34,10 @@ namespace Donut
HDRIManager& operator=(const HDRIManager&) = delete;
std::unordered_map<std::string, Ref<CubemapTexture>> m_hdri_cache;
-
+
Ref<CubemapTexture> m_current_hdri;
-
- std::vector<std::string> m_available_hdri =
+
+ std::vector<std::string> m_available_hdri =
{
"assets/hdri/hdr_blue_nebulae_1.hdr",
"assets/hdri/hdr_subdued_blue_nebulae.hdr",