summaryrefslogtreecommitdiff
path: root/vcl/opengl/gdiimpl.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'vcl/opengl/gdiimpl.cxx')
-rw-r--r--vcl/opengl/gdiimpl.cxx25
1 files changed, 18 insertions, 7 deletions
diff --git a/vcl/opengl/gdiimpl.cxx b/vcl/opengl/gdiimpl.cxx
index 2526cde6ff40..f56dd4af2a38 100644
--- a/vcl/opengl/gdiimpl.cxx
+++ b/vcl/opengl/gdiimpl.cxx
@@ -1195,13 +1195,24 @@ void OpenGLSalGraphicsImpl::drawRect( long nX, long nY, long nWidth, long nHeigh
if( UseSolid( mnLineColor ) )
{
- const long nX1( nX );
- const long nY1( nY );
- const long nX2( nX + nWidth );
- const long nY2( nY + nHeight );
- const SalPoint aPoints[] = { { nX1, nY1 }, { nX2, nY1 },
- { nX2, nY2 }, { nX1, nY2 } };
- DrawLines( 4, aPoints, true ); // No need for AA.
+ GLfloat fX1 = OPENGL_COORD_X(nX);
+ GLfloat fY1 = OPENGL_COORD_Y(nY);
+ GLfloat fX2 = OPENGL_COORD_X(nX + nWidth);
+ GLfloat fY2 = OPENGL_COORD_Y(nY + nHeight);
+
+ GLfloat pPoints[16];
+
+ pPoints[0] = fX1;
+ pPoints[1] = fY1;
+ pPoints[2] = fX2;
+ pPoints[3] = fY1;
+ pPoints[4] = fX2;
+ pPoints[5] = fY2;
+ pPoints[6] = fX1;
+ pPoints[7] = fY2;
+
+ mpProgram->SetVertices(pPoints);
+ glDrawArrays(GL_LINE_LOOP, 0, 4);
}
PostDraw();