Dawn/src/dawnopengl/display/shader/buffers/RenderPipelineShaderBuffer.hpp
2023-05-29 19:50:04 -07:00

30 lines
761 B
C++

// Copyright (c) 2023 Dominic Masters
//
// This software is released under the MIT License.
// https://opensource.org/licenses/MIT
#pragma once
#include "display/shader/ShaderParameterBuffer.hpp"
namespace Dawn {
struct RenderPipelineShaderBufferData {
glm::mat4 view;
glm::mat4 projection;
};
class RenderPipelineShaderBuffer : public ShaderParameterBuffer<struct RenderPipelineShaderBufferData> {
public:
static std::string getShaderUniformName() {
return "ub_RenderPipeline";
}
static std::string getShaderUniform() {
return std::string(
"layout (std140) uniform ub_RenderPipeline {\n"
"mat4 u_View;\n"
"mat4 u_Projection;\n"
"};"
);
}
};
}