From d18ad8a7fb3257001a5045e11f3f770a48a7fa69 Mon Sep 17 00:00:00 2001 From: Tomaž Vajngerl Date: Wed, 24 Feb 2016 00:44:58 +0100 Subject: opengl: shader based polyline rendering - fixes tdf#97137 for OGL Adds native opengl polyline rendering to draw polylines, line joins and line caps as triangle strips. The vertex shader allows for the dynamic line width by calculating the correct vertex posiitons, and the fragment shader is used for anti-aliasing. Change-Id: If7982c828cae1fae59c57194c8ac77e5ad7f1d26 --- vcl/inc/opengl/program.hxx | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'vcl/inc/opengl') diff --git a/vcl/inc/opengl/program.hxx b/vcl/inc/opengl/program.hxx index 5de3c1bdbe5f..780cba72380f 100644 --- a/vcl/inc/opengl/program.hxx +++ b/vcl/inc/opengl/program.hxx @@ -37,6 +37,7 @@ private: GLuint mnTexCoordAttrib; GLuint mnAlphaCoordAttrib; GLuint mnMaskCoordAttrib; + GLuint mnNormalAttrib; TextureList maTextures; bool mbBlending; @@ -59,6 +60,7 @@ public: void SetTextureCoord( const GLvoid* pData ); void SetAlphaCoord( const GLvoid* pData ); void SetMaskCoord(const GLvoid* pData); + void SetExtrusionVectors(const GLvoid* pData); void SetUniform1f( const OString& rName, GLfloat v1 ); void SetUniform2f( const OString& rName, GLfloat v1, GLfloat v2 ); @@ -80,7 +82,7 @@ public: bool DrawTexture( const OpenGLTexture& rTexture ); protected: - void SetVertexAttrib( GLuint& rAttrib, const OString& rName, const GLvoid* pData ); + void SetVertexAttrib( GLuint& rAttrib, const OString& rName, const GLvoid* pData, GLint nSize = 2 ); GLuint GetUniformLocation( const OString& rName ); }; -- cgit