vsg 1.1.3
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/state/ShaderStage.h>
6
7namespace vsg
8{
9
14 class VSG_DECLSPEC ShaderCompiler : public Inherit<Visitor, ShaderCompiler>
15 {
16 public:
18 virtual ~ShaderCompiler();
19
22 bool supported() const;
23
24 // default ShaderCompileSettings
26
27 bool compile(ShaderStages& shaders, const std::vector<std::string>& defines = {}, ref_ptr<const Options> options = {});
28 bool compile(ref_ptr<ShaderStage> shaderStage, const std::vector<std::string>& defines = {}, ref_ptr<const Options> options = {});
29
30 std::string combineSourceAndDefines(const std::string& source, const std::vector<std::string>& defines);
31
32 void apply(Node& node) override;
33 void apply(BindGraphicsPipeline& bgp) override;
34 void apply(BindComputePipeline& bgp) override;
35 void apply(BindRayTracingPipeline& bgp) override;
36
37 protected:
38 bool _initialized = false;
39 };
40 VSG_type_name(vsg::ShaderCompiler);
41
42} // namespace vsg
Definition Inherit.h:28
Definition ShaderCompiler.h:15
bool supported() const
Definition ref_ptr.h:22