nCine::BinaryShaderCache class

Manages the cache of binary OpenGL shader programs.

Constructors, destructors, conversion operators

BinaryShaderCache(StringView path)
BinaryShaderCache(const BinaryShaderCache&) deleted

Public functions

auto operator=(const BinaryShaderCache&) -> BinaryShaderCache& deleted
auto IsAvailable() const -> bool
auto GetPlatformHash() const -> std::uint64_t
auto GetCachedShaderPath(const char* shaderName) -> String
auto LoadFromCache(const char* shaderName, std::uint64_t shaderVersion, GLShaderProgram* program, GLShaderProgram::Introspection introspection) -> bool
auto SaveToCache(const char* shaderName, std::uint64_t shaderVersion, GLShaderProgram* program) -> bool
auto Prune() -> std::uint32_t
Deletes all binary shaders that not belong to this platform from the cache directory.
auto Clear() -> bool
Deletes all binary shaders from the cache directory.
auto Path() -> const StringView
Returns the current cache directory for binary shaders.
auto SetPath(StringView path) -> bool
Sets a new directory as the cache for binary shaders.