aboutsummaryrefslogtreecommitdiff
path: root/include/RenderBackend/OpenGL/PixelShader.hpp
diff options
context:
space:
mode:
authordec05eba <dec05eba@protonmail.com>2017-12-21 22:52:12 +0100
committerdec05eba <dec05eba@protonmail.com>2021-11-18 15:21:48 +0100
commitbfd21732b35a3856b1f72c826816c2857710fcb3 (patch)
tree4a3f19551c744db3e339a64ac1afa2ebe1ec015f /include/RenderBackend/OpenGL/PixelShader.hpp
parentca92d8c90f7103db6d7cae4cef49b278d804b474 (diff)
Added shader program
Diffstat (limited to 'include/RenderBackend/OpenGL/PixelShader.hpp')
-rw-r--r--include/RenderBackend/OpenGL/PixelShader.hpp14
1 files changed, 1 insertions, 13 deletions
diff --git a/include/RenderBackend/OpenGL/PixelShader.hpp b/include/RenderBackend/OpenGL/PixelShader.hpp
index 3d33155..b869a8f 100644
--- a/include/RenderBackend/OpenGL/PixelShader.hpp
+++ b/include/RenderBackend/OpenGL/PixelShader.hpp
@@ -45,27 +45,15 @@ namespace amalgine
public:
PixelShader();
- const std::string& getOutputAttributeName(i32 attributeIndex);
- ShaderOutputVec4 defineOutputVec4(const std::string &name);
void defineMain(PixelShaderMainFunc mainFunc);
void assign(const ShaderOutputVec4 &lhsVariable, const ShaderVec4 &rhsVariable);
- std::string build();
+ std::string build() const;
private:
void writeHeader(const std::string &code);
void writeBody(const std::string &code);
-
- /*
- * Throws PixelShaderTooManyAttributes if too many pixel attributes are defined for the platform.
- * Throws PixelShaderAttributeAlreadyDefined if a pixel attribute with the same name has already been defined.
- */
- i32 defineOutputVariable(const std::string &variableName, const char *typeName);
private:
std::string header;
std::string body;
- int locationCounter;
- i32 maxPixelAttribs; // Could make this static
- std::unordered_map<std::string, i32> pixelAttributes;
- std::vector<std::string> pixelAttributeNames;
bool mainFuncDefined;
};
}