diff options
author | Tomaž Vajngerl <tomaz.vajngerl@collabora.co.uk> | 2015-08-24 15:00:26 +0900 |
---|---|---|
committer | Tomaž Vajngerl <tomaz.vajngerl@collabora.co.uk> | 2015-08-24 19:08:10 +0900 |
commit | bdce4e29191aa5bd029efa242e094aba45c44869 (patch) | |
tree | 5088ad08e3d44dbda6fc901ae0afe3eaebff56c3 /vcl/opengl/program.cxx | |
parent | b26ba85d04e81f48622dfdbb71d9d80b54dacc40 (diff) |
opengl: push mask coords to the shaders along the image coords
If using the same texture to store the image and mask data (for
example when using texture atlas) the mask and image (RGB) coords
aren't the same anymore. With this commit we always define the mask
coords separately.
Change-Id: Ie33f87a6e9ab398972c6a3d5938e5f1364c82d36
Diffstat (limited to 'vcl/opengl/program.cxx')
-rw-r--r-- | vcl/opengl/program.cxx | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/vcl/opengl/program.cxx b/vcl/opengl/program.cxx index 3bfa6c2a453c..ede054816d5f 100644 --- a/vcl/opengl/program.cxx +++ b/vcl/opengl/program.cxx @@ -21,6 +21,7 @@ OpenGLProgram::OpenGLProgram() : mnPositionAttrib( SAL_MAX_UINT32 ), mnTexCoordAttrib( SAL_MAX_UINT32 ), mnAlphaCoordAttrib( SAL_MAX_UINT32 ), + mnMaskCoordAttrib( SAL_MAX_UINT32 ), mbBlending( false ) { } @@ -112,6 +113,11 @@ void OpenGLProgram::SetAlphaCoord( const GLvoid* pData ) SetVertexAttrib( mnAlphaCoordAttrib, "alpha_coord_in", pData ); } +void OpenGLProgram::SetMaskCoord(const GLvoid* pData) +{ + SetVertexAttrib(mnMaskCoordAttrib, "mask_coord_in", pData); +} + GLuint OpenGLProgram::GetUniformLocation( const OString& rName ) { auto it = maUniformLocations.find( rName ); |