#pragma once #include "VertexShader.hpp" #include "PixelShader.hpp" #include "../../Result.hpp" #include "../../types.hpp" #include namespace amalgine { class ShaderProgram { public: ShaderProgram(); const std::string& getOutputAttributeName(i32 attributeIndex); ShaderOutputVec4 defineOutputVec4(const std::string &name); //Result addVertexShader(const VertexShader &vertexShader); //Result addPixelShader(const PixelShader &pixelShader); //void build(); private: /* * 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: int locationCounter; i32 maxPixelAttribs; // Could make this static std::unordered_map pixelAttributes; std::vector pixelAttributeNames; std::vector shaderIds; }; }