diff options
author | Tomaž Vajngerl <tomaz.vajngerl@collabora.co.uk> | 2015-07-08 18:43:32 +0900 |
---|---|---|
committer | Tomaž Vajngerl <tomaz.vajngerl@collabora.co.uk> | 2015-07-09 10:09:17 +0900 |
commit | 2e99e4e11d33679aed674eea0d6054d16d39d6df (patch) | |
tree | 219bebe169c7322758df36770e3fdc3206c6aa5d /vcl/inc/opengl | |
parent | a1385d37e9ffc84b82e9ee11e505bba6273823dc (diff) |
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/opengl')
-rw-r--r-- | vcl/inc/opengl/program.hxx | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/vcl/inc/opengl/program.hxx b/vcl/inc/opengl/program.hxx index 3ac0ff45f3db..5ca9afff47d6 100644 --- a/vcl/inc/opengl/program.hxx +++ b/vcl/inc/opengl/program.hxx @@ -67,6 +67,8 @@ public: const basegfx::B2DPoint& rY ); void SetBlendMode( GLenum nSFactor, GLenum nDFactor ); + void ApplyMatrix(float fWidth, float fHeight, float fPixelOffset = 0.0f); + bool DrawTexture( OpenGLTexture& rTexture ); protected: |