Nameless Engine
Loading...
Searching...
No Matches
ShaderFilesystemPaths.hpp
1#pragma once
2
3// Standard.
4#include <filesystem>
5
6// Custom.
7#include "misc/ProjectPaths.h"
8
9namespace ne {
12 public:
13 ShaderFilesystemPaths() = delete;
15 ShaderFilesystemPaths& operator=(const ShaderFilesystemPaths&) = delete;
16
23 static std::filesystem::path getPathToShaderCacheDirectory() {
24 std::filesystem::path basePath = ProjectPaths::getPathToCompiledShadersDirectory();
25
26 if (!std::filesystem::exists(basePath)) {
27 std::filesystem::create_directories(basePath);
28 }
29 return basePath;
30 }
31
41
42 private:
44 static inline constexpr auto sShaderCacheBaseFileName = "shader";
45 };
46} // namespace ne
static std::filesystem::path getPathToCompiledShadersDirectory()
Definition: ProjectPaths.cpp:40
Definition: ShaderFilesystemPaths.hpp:11
static std::filesystem::path getPathToShaderCacheDirectory()
Definition: ShaderFilesystemPaths.hpp:23
static constexpr auto sShaderCacheBaseFileName
Definition: ShaderFilesystemPaths.hpp:44
static std::string getShaderCacheBaseFileName()
Definition: ShaderFilesystemPaths.hpp:40