vsg 1.1.10
VulkanSceneGraph library
Loading...
Searching...
No Matches
ShaderCompiler.h
1#pragma once
2
3#include <vsg/core/Visitor.h>
4#include <vsg/io/FileSystem.h>
5#include <vsg/io/Options.h>
6#include <vsg/state/ShaderStage.h>
7
8namespace vsg
9{
10
15 class VSG_DECLSPEC ShaderCompiler : public Inherit<Visitor, ShaderCompiler>
16 {
17 public:
18 ShaderCompiler();
19 virtual ~ShaderCompiler();
20
23 bool supported() const;
24
25 // default ShaderCompileSettings
27
28 bool compile(ShaderStages& shaders, const std::vector<std::string>& defines = {}, ref_ptr<const Options> options = {});
29 bool compile(ref_ptr<ShaderStage> shaderStage, const std::vector<std::string>& defines = {}, ref_ptr<const Options> options = {});
30
31 std::string combineSourceAndDefines(const std::string& source, const std::vector<std::string>& defines);
32
33 void apply(Node& node) override;
34 void apply(BindGraphicsPipeline& bgp) override;
35 void apply(BindComputePipeline& bgp) override;
36 void apply(BindRayTracingPipeline& bgp) override;
37
38 protected:
39 bool _initialized = false;
40 };
41 VSG_type_name(vsg::ShaderCompiler);
42
43} // namespace vsg
bool supported() const
Definition ref_ptr.h:22