diff options
author | dan sinclair <dj2@everburning.com> | 2019-03-28 10:32:11 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-03-28 10:32:11 -0400 |
commit | 5fc7b6e796b9c6264e538a699ec3f50235a85449 (patch) | |
tree | 22c1772ce9b376e02541ed9cb24f693204eb4a45 /src/pipeline.cc | |
parent | 7fa3e97ad0028fbac3ffeb7c47f19cfc4309fef5 (diff) | |
download | amber-5fc7b6e796b9c6264e538a699ec3f50235a85449.tar.gz |
Hide pipeline buffer formats (#420)
The default colour formats are only used in the pipeline class so this
CL moves them into the anonymous namespace.
Diffstat (limited to 'src/pipeline.cc')
-rw-r--r-- | src/pipeline.cc | 14 |
1 files changed, 9 insertions, 5 deletions
diff --git a/src/pipeline.cc b/src/pipeline.cc index b7e2780..a759aeb 100644 --- a/src/pipeline.cc +++ b/src/pipeline.cc @@ -21,6 +21,15 @@ #include "src/make_unique.h" namespace amber { +namespace { + +const char* kDefaultColorBufferFormat = "B8G8R8A8_UNORM"; +const char* kDefaultDepthBufferFormat = "D32_SFLOAT_S8_UINT"; + +} // namespace + +const char* Pipeline::kGeneratedColorBuffer = "framebuffer"; +const char* Pipeline::kGeneratedDepthBuffer = "depth_buffer"; Pipeline::ShaderInfo::ShaderInfo(const Shader* shader, ShaderType type) : shader_(shader), shader_type_(type), entry_point_("main") {} @@ -29,11 +38,6 @@ Pipeline::ShaderInfo::ShaderInfo(const ShaderInfo&) = default; Pipeline::ShaderInfo::~ShaderInfo() = default; -const char* Pipeline::kDefaultColorBufferFormat = "B8G8R8A8_UNORM"; -const char* Pipeline::kDefaultDepthBufferFormat = "D32_SFLOAT_S8_UINT"; -const char* Pipeline::kGeneratedColorBuffer = "framebuffer"; -const char* Pipeline::kGeneratedDepthBuffer = "depth_buffer"; - Pipeline::Pipeline(PipelineType type) : pipeline_type_(type) {} Pipeline::~Pipeline() = default; |