summaryrefslogtreecommitdiff
path: root/vcl/inc
diff options
context:
space:
mode:
authorTomaž Vajngerl <tomaz.vajngerl@collabora.co.uk>2016-05-27 17:54:50 +0900
committerTomaž Vajngerl <quikee@gmail.com>2016-05-30 09:50:12 +0000
commit4b13afe164f2701bf8c13d9be5b3ac2d093249e2 (patch)
treeab7c4187bda9e89d9e4f79de9af0b4e70fc7c067 /vcl/inc
parentfdd5860624f5e1c1cfbaea3c72e65c00ce3e1e5c (diff)
tdf#100080 set unused shader attribs with values, fixes GL on AMD
AMD drivers don't work well if a shader has a defined but not enabled shader attributes. For this reason we need to make sure that all attributes are set to some value even if the shader doesn't use that attribute. Intel drivers, on the other hand, crash if you enable an attribute and don't set it (set it to null) - so we can't use this workaround. Change-Id: Ic076cf8a5fac8ef048d0054e6e4340b47b4d5188 Reviewed-on: https://gerrit.libreoffice.org/25591 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Tomaž Vajngerl <quikee@gmail.com> (cherry picked from commit fdcd13c1c2b8b9fbc3480c8fa92920d8c8d4e5a7) Reviewed-on: https://gerrit.libreoffice.org/25594 Tested-by: Tomaž Vajngerl <quikee@gmail.com>
Diffstat (limited to 'vcl/inc')
-rw-r--r--vcl/inc/opengl/program.hxx1
1 files changed, 1 insertions, 0 deletions
diff --git a/vcl/inc/opengl/program.hxx b/vcl/inc/opengl/program.hxx
index 2fab98c6b4d5..3c194d887ba9 100644
--- a/vcl/inc/opengl/program.hxx
+++ b/vcl/inc/opengl/program.hxx
@@ -106,6 +106,7 @@ public:
void DrawArrays(GLenum GLenum, std::vector<GLfloat>& aVertices);
protected:
+ bool EnableVertexAttrib(GLuint& rAttrib, const OString& rName);
void SetVertexAttrib( GLuint& rAttrib, const OString& rName, const GLvoid* pData, GLint nSize = 2 );
GLuint GetUniformLocation( const OString& rName );
};