[Libreoffice-commits] core.git: Branch 'feature/opengl-vcl' - 2 commits - vcl/opengl

Markus Mohrhard markus.mohrhard at collabora.co.uk
Sat Nov 8 11:21:09 PST 2014


 vcl/opengl/gdiimpl.cxx |    6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

New commits:
commit 8f9a75d1a2e94ea2a31949484581b97e50e0c14c
Author: Markus Mohrhard <markus.mohrhard at collabora.co.uk>
Date:   Sat Nov 8 20:17:29 2014 +0100

    fix line position
    
    Change-Id: Ic604eb7b0d663928ab614fe85530e4f925bcff8f

diff --git a/vcl/opengl/gdiimpl.cxx b/vcl/opengl/gdiimpl.cxx
index a92682a..835d344 100644
--- a/vcl/opengl/gdiimpl.cxx
+++ b/vcl/opengl/gdiimpl.cxx
@@ -302,8 +302,8 @@ void OpenGLSalGraphicsImpl::DrawLines( sal_uInt32 nPoints, const SalPoint* pPtAr
 
     for( i = 0, j = 0; i < nPoints; i++ )
     {
-        aPoints[j++] = (2 * pPtAry[i].mnX) / GetWidth()  - 1.0;
-        aPoints[j++] = (2 * pPtAry[i].mnY) / GetHeight() - 1.0;
+        aPoints[j++] = (2 * pPtAry[i].mnX) / GetWidth()  - 1.0f;
+        aPoints[j++] = 1.0f - (2 * pPtAry[i].mnY) / GetHeight();
     }
 
     glEnableVertexAttribArray( GL_ATTRIB_POS );
commit 681eafcbe1bf13cdb7cbc1bf7d5a37b820caebdb
Author: Markus Mohrhard <markus.mohrhard at collabora.co.uk>
Date:   Sat Nov 8 20:15:33 2014 +0100

    fix ellipse rendering completely
    
    Change-Id: I861ab0442f85f54d4a390d46c784bcf03545ae15

diff --git a/vcl/opengl/gdiimpl.cxx b/vcl/opengl/gdiimpl.cxx
index 161de3a..a92682a 100644
--- a/vcl/opengl/gdiimpl.cxx
+++ b/vcl/opengl/gdiimpl.cxx
@@ -372,7 +372,7 @@ void OpenGLSalGraphicsImpl::DrawPolygon( sal_uInt32 nPoints, const SalPoint* pPt
         {
             const ::basegfx::B2DPoint& rPt( aResult.getB2DPoint(i) );
             aVertices[j++] = 2 * rPt.getX() / nWidth - 1.0f;
-            aVertices[j++] = 2 * rPt.getY() / nHeight - 1.0f;
+            aVertices[j++] = 1.0f - 2 * rPt.getY() / nHeight;
         }
 
         glEnableVertexAttribArray( GL_ATTRIB_POS );


More information about the Libreoffice-commits mailing list