summaryrefslogtreecommitdiffstats
path: root/vcl/inc/openglgdiimpl.hxx
diff options
context:
space:
mode:
authorTomaž Vajngerl <tomaz.vajngerl@collabora.co.uk>2015-07-08 18:43:32 +0900
committerTomaž Vajngerl <tomaz.vajngerl@collabora.co.uk>2015-07-09 10:09:17 +0900
commit2e99e4e11d33679aed674eea0d6054d16d39d6df (patch)
tree219bebe169c7322758df36770e3fdc3206c6aa5d /vcl/inc/openglgdiimpl.hxx
parentopengl: adjust rect drawing - should be to width (height) - 1 (diff)
downloadcore-2e99e4e11d33679aed674eea0d6054d16d39d6df.tar.gz
core-2e99e4e11d33679aed674eea0d6054d16d39d6df.zip
opengl: use MVP matrix in vertex shaders, pixel offsets
ChangChange all vertex shaders to accept model, view, projection matrix to calculate the vertex position. So now we don't need to convert the coordinates to OpenGL coordinate space [-1.0, 1.0] anymore. Additionally make it possible to offset vertex coordinates so we can apply 0.5 px offset (to hit the pixel center) at some operations. Change-Id: I8e0a61d5fd4ab6aaa1c0c94439061725918577a0
Diffstat (limited to 'vcl/inc/openglgdiimpl.hxx')
-rw-r--r--vcl/inc/openglgdiimpl.hxx2
1 files changed, 2 insertions, 0 deletions
diff --git a/vcl/inc/openglgdiimpl.hxx b/vcl/inc/openglgdiimpl.hxx
index 444c9f232fef..b05638298e69 100644
--- a/vcl/inc/openglgdiimpl.hxx
+++ b/vcl/inc/openglgdiimpl.hxx
@@ -72,6 +72,8 @@ protected:
void ImplDrawLineAA( double nX1, double nY1, double nX2, double nY2, bool edge = false );
bool CheckOffscreenTexture();
+ void ApplyProgramMatrices(float fPixelOffset = 0.0);
+
public:
bool UseProgram( const OUString& rVertexShader, const OUString& rFragmentShader, const OString& preamble = "" );
bool UseSolid( SalColor nColor, sal_uInt8 nTransparency );