diff --git a/include/ACGL/OpenGL/Objects/ShaderProgram.hh b/include/ACGL/OpenGL/Objects/ShaderProgram.hh index 56976f0ce710a4c8916066fbe07918d8cbccc56a..365edc01700f37a945d0791f0a68b9e3383db342 100644 --- a/include/ACGL/OpenGL/Objects/ShaderProgram.hh +++ b/include/ACGL/OpenGL/Objects/ShaderProgram.hh @@ -47,6 +47,7 @@ #include #include #include +#include #include #include @@ -255,8 +256,9 @@ public: #endif // OpenGL >= 4.0 //! sets a texture uniform to a given texture unit and also binds the texture to the same unit - inline void setTexture (GLint _location, const ConstSharedTextureBase& _texture, GLint _unit) const { glUniform1i(_location, _unit); _texture->bind(_unit); } - inline void setTexture (const std::string& _nameInShader, const ConstSharedTextureBase& _texture, GLint _unit) const { setUniform( getUniformLocation(_nameInShader), (GLint) _unit); _texture->bind(_unit); } + inline void setTexture (GLint _location, const ConstSharedTextureBase& _texture, GLint _unit) const { glUniform1i(_location, _unit); _texture->bind(_unit); } + inline void setTexture (const std::string& _nameInShader, const ConstSharedTextureBase& _texture, GLint _unit) const { setUniform( getUniformLocation(_nameInShader), (GLint) _unit); _texture->bind(_unit); } + inline void setTexture (const std::string& _nameInShader, const ConstSharedTextureBuffer& _texture, GLint _unit) const { setUniform( getUniformLocation(_nameInShader), (GLint) _unit); _texture->bindTexture(_unit); } #if (ACGL_OPENGL_VERSION >= 41) // DSA versions: