diff options
author | Tomaž Vajngerl <tomaz.vajngerl@collabora.co.uk> | 2016-05-27 17:54:50 +0900 |
---|---|---|
committer | Tomaž Vajngerl <quikee@gmail.com> | 2016-05-29 06:20:36 +0000 |
commit | fdcd13c1c2b8b9fbc3480c8fa92920d8c8d4e5a7 (patch) | |
tree | 9089dc479bb52f5157f6a3fa6598284e01ab84dd /vcl/inc/opengl | |
parent | 8915919b57473fd88e338e874652d0b87e0c2482 (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>
Diffstat (limited to 'vcl/inc/opengl')
-rw-r--r-- | vcl/inc/opengl/program.hxx | 1 |
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 ); }; |