diff --git a/libkwineffects/kwinglutils.h b/libkwineffects/kwinglutils.h index 1124fd48d5..553e713cff 100644 --- a/libkwineffects/kwinglutils.h +++ b/libkwineffects/kwinglutils.h @@ -443,6 +443,14 @@ public: * @see ShaderManager::pushShader **/ explicit ShaderBinder(GLShader *shader); + /** + * @brief Pushes the Shader with the given @p traits to the ShaderManager's stack. + * + * @param traits The traits describing the shader + * @see ShaderManager::pushShader + * @since 5.6 + **/ + explicit ShaderBinder(ShaderTraits traits); ~ShaderBinder(); /** @@ -468,6 +476,13 @@ ShaderBinder::ShaderBinder(GLShader *shader) ShaderManager::instance()->pushShader(shader); } +inline +ShaderBinder::ShaderBinder(ShaderTraits traits) + : m_shader(nullptr) +{ + m_shader = ShaderManager::instance()->pushShader(traits); +} + inline ShaderBinder::~ShaderBinder() {