summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJan Holesovsky <kendy@collabora.com>2014-11-13 05:58:01 +0100
committerMarkus Mohrhard <markus.mohrhard@googlemail.com>2014-11-15 12:36:29 +0100
commit6fd7199230bfc81d6aadf53b3c115def8caba90c (patch)
tree80164b98bc7311a664316614487d47f77dd130c2
parent4093a540084488ed5d346f590dbf2a6d91286066 (diff)
windows opengl: Set PFD_DOUBLEBUFFER even for single buffer rendering.
Otherwise I'm getting lots of errers when dealing with virtual devices... Change-Id: I34e145817d21dfc2d30fa9ffdfedfa714467d105
-rw-r--r--vcl/opengl/gdiimpl.cxx3
-rw-r--r--vcl/source/opengl/OpenGLContext.cxx5
2 files changed, 6 insertions, 2 deletions
diff --git a/vcl/opengl/gdiimpl.cxx b/vcl/opengl/gdiimpl.cxx
index 04237757cd80..09e80f8b8987 100644
--- a/vcl/opengl/gdiimpl.cxx
+++ b/vcl/opengl/gdiimpl.cxx
@@ -1478,6 +1478,7 @@ bool OpenGLSalGraphicsImpl::drawGradient(const tools::PolyPolygon& rPolyPoly,
glDisable( GL_STENCIL_TEST );
PostDraw();
+ CHECK_GL_ERROR();
return true;
}
@@ -1496,6 +1497,8 @@ void OpenGLSalGraphicsImpl::endPaint()
maContext.makeCurrent();
glFlush();
}
+
+ CHECK_GL_ERROR();
}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/vcl/source/opengl/OpenGLContext.cxx b/vcl/source/opengl/OpenGLContext.cxx
index 0e760bc84457..866c38ea2265 100644
--- a/vcl/source/opengl/OpenGLContext.cxx
+++ b/vcl/source/opengl/OpenGLContext.cxx
@@ -767,8 +767,9 @@ bool OpenGLContext::ImplInit()
0, 0, 0 // Layer Masks Ignored
};
- if (mbUseDoubleBufferedRendering)
- PixelFormatFront.dwFlags |= PFD_DOUBLEBUFFER;
+ // interestingly we need this flag being set even if we use single buffer
+ // rendering - otherwise we get errors with virtual devices
+ PixelFormatFront.dwFlags |= PFD_DOUBLEBUFFER;
if (mbRequestVirtualDevice)
PixelFormatFront.dwFlags |= PFD_DRAW_TO_BITMAP;