summaryrefslogtreecommitdiff
path: root/vcl/inc/opengl
diff options
context:
space:
mode:
authorTomaž Vajngerl <tomaz.vajngerl@collabora.com>2016-02-24 00:44:58 +0100
committerTomaž Vajngerl <tomaz.vajngerl@collabora.com>2016-02-25 11:16:19 +0100
commitd18ad8a7fb3257001a5045e11f3f770a48a7fa69 (patch)
treedb0d594bd7c1c4e2c458913b24a0978b7d4951d7 /vcl/inc/opengl
parent9c6b6c6c074a8597502e899a22aa7cb1c3f712ce (diff)
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
Diffstat (limited to 'vcl/inc/opengl')
-rw-r--r--vcl/inc/opengl/program.hxx4
1 files changed, 3 insertions, 1 deletions
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 );
};