changeset 22490:49103c6e0782

Enable AlphaChannel in Qt GLCanvas. * GLCanvas.cc (GLCanvas::GLCanvas): Add QGL::AlphaChannel to format used in constructor.
author Rik <rik@octave.org>
date Wed, 14 Sep 2016 16:45:45 -0700
parents 93ea313301f9
children 112292a9b837
files libgui/graphics/GLCanvas.cc
diffstat 1 files changed, 7 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/libgui/graphics/GLCanvas.cc	Wed Sep 14 16:05:16 2016 -0700
+++ b/libgui/graphics/GLCanvas.cc	Wed Sep 14 16:45:45 2016 -0700
@@ -35,10 +35,14 @@
 
   GLCanvas::GLCanvas (QWidget* xparent, const graphics_handle& gh)
 #if defined (Q_OS_WIN32)
-    : QGLWidget (QGLFormat (QGL::SampleBuffers | QGL::IndirectRendering),
-                 xparent), Canvas (gh)
+    : QGLWidget (QGLFormat (QGL::SampleBuffers | QGL::AlphaChannel |
+                            QGL::IndirectRendering),
+                 xparent),
+      Canvas (gh)
 #else
-    : QGLWidget (QGLFormat (QGL::SampleBuffers), xparent), Canvas (gh)
+    : QGLWidget (QGLFormat (QGL::SampleBuffers | QGL::AlphaChannel),
+                 xparent),
+      Canvas (gh)
 #endif
   {
     setFocusPolicy (Qt::ClickFocus);