diff options
author | Tomaž Vajngerl <tomaz.vajngerl@collabora.co.uk> | 2016-05-29 12:37:41 +0900 |
---|---|---|
committer | Tomaž Vajngerl <tomaz.vajngerl@collabora.co.uk> | 2016-06-08 11:39:22 +0900 |
commit | 344dc6939c45552dc162ea8b3f892e2ae4998d64 (patch) | |
tree | c7cb883e535ec3df4b2b0cdff9b5e104a68c954d /vcl/opengl/program.cxx | |
parent | d0ec6c7b72f5826b9645c997b03d6f032b4f72f7 (diff) |
opengl: batch drawing of pixel, line, rect draw calls
Change-Id: Ib1619fa476f488c5315411b1ad4d1b7464c70c69
Diffstat (limited to 'vcl/opengl/program.cxx')
-rw-r--r-- | vcl/opengl/program.cxx | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/vcl/opengl/program.cxx b/vcl/opengl/program.cxx index de6cec774840..8aadb9d89c67 100644 --- a/vcl/opengl/program.cxx +++ b/vcl/opengl/program.cxx @@ -24,8 +24,9 @@ OpenGLProgram::OpenGLProgram() : mnTexCoordAttrib( SAL_MAX_UINT32 ), mnAlphaCoordAttrib( SAL_MAX_UINT32 ), mnMaskCoordAttrib( SAL_MAX_UINT32 ), - mnNormalAttrib( SAL_MAX_UINT32 ), - mbBlending( false ), + mnExtrusionVectorsAttrib( SAL_MAX_UINT32 ), + mnVertexColorsAttrib( SAL_MAX_UINT32 ), + mbBlending(false), mfLastWidth(0.0), mfLastHeight(0.0), mfLastPixelOffset(0.0) @@ -147,7 +148,12 @@ void OpenGLProgram::SetMaskCoord(const GLvoid* pData) void OpenGLProgram::SetExtrusionVectors(const GLvoid* pData) { - SetVertexAttrib(mnNormalAttrib, "extrusion_vectors", pData, 3); + SetVertexAttrib(mnExtrusionVectorsAttrib, "extrusion_vectors", pData, 3); +} + +void OpenGLProgram::SetVertexColors(std::vector<glm::vec4>& rColorVector) +{ + SetVertexAttrib(mnVertexColorsAttrib, "vertex_color_in", glm::value_ptr(rColorVector[0]), 4); } void OpenGLProgram::SetShaderType(TextureShaderType eTextureShaderType) |