aboutsummaryrefslogtreecommitdiff
path: root/src/shader_compiler.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/shader_compiler.h')
-rw-r--r--src/shader_compiler.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/shader_compiler.h b/src/shader_compiler.h
index 6b89a74..e60b02d 100644
--- a/src/shader_compiler.h
+++ b/src/shader_compiler.h
@@ -25,12 +25,17 @@
namespace amber {
+/// Class to wrap the compilation of shaders.
class ShaderCompiler {
public:
ShaderCompiler();
explicit ShaderCompiler(const std::string& env);
~ShaderCompiler();
+ /// Returns a result code and a compilation of the given shader.
+ /// If the |shader| has a corresponding entry in the |shader_map|, then the
+ /// compilation result is copied from that entry. Otherwise a compiler is
+ /// invoked to produce the compilation result.
std::pair<Result, std::vector<uint32_t>> Compile(
const Shader* shader,
const ShaderMap& shader_map) const;