Euphoria
materialshadercache.h
Go to the documentation of this file.
1 #pragma once
2 
3 #include "core/cache.h"
4 #include "io/vfs_path.h"
5 #include "assert/assert.h"
7 
8 namespace eu::render
9 {
11  : core::Cache<io::FilePath, MaterialShader, MaterialShaderCache>
12  {
14 
16  {
17  ASSERT(fs);
18  }
19 
20  [[nodiscard]] std::shared_ptr<MaterialShader>
21  create(const io::FilePath& path) const
22  {
23  auto ret = std::make_shared<MaterialShader>();
24  ret->load(file_system, path);
25  return ret;
26  }
27  };
28 
29 }
#define ASSERT(x)
Definition: assert.h:29
std::shared_ptr< MaterialShader > create(const io::FilePath &path) const
MaterialShaderCache(io::FileSystem *fs)