#pragma once #include #include #include #include #include "Shader.hpp" #include "../buffer/Abstract.hpp" namespace render { struct passOptions; } namespace render::gl { class Renderer; } /// OpenGL programs namespace pass { /// OpenGL shaders pipeline class Program { public: virtual ~Program(); /// Bind program void useIt(); static GLuint loadTexture(const std::string &name, bool linear = true); static GLuint loadTextureArray(const std::vector &names, const std::string &suffix = "", float mipMapLOD = 0, float anisotropy = 0); static GLuint loadTextureCube(const std::string &name); protected: /// Get shaders name prefix virtual std::string getName() const = 0; Shader *loadShader(GLenum type, const std::vector &flags = {}); void load(const std::vector &shaders); GLuint ProgramID; }; }