[GRASS-SVN] r61063 - grass/trunk/gui/wxpython/nviz

svn_grass at osgeo.org svn_grass at osgeo.org
Sun Jun 29 07:32:29 PDT 2014


Author: hcho
Date: 2014-06-29 07:32:29 -0700 (Sun, 29 Jun 2014)
New Revision: 61063

Modified:
   grass/trunk/gui/wxpython/nviz/mapwindow.py
Log:
nviz: Add WX_GL_RGBA to the attributes list

Modified: grass/trunk/gui/wxpython/nviz/mapwindow.py
===================================================================
--- grass/trunk/gui/wxpython/nviz/mapwindow.py	2014-06-29 14:18:36 UTC (rev 61062)
+++ grass/trunk/gui/wxpython/nviz/mapwindow.py	2014-06-29 14:32:29 UTC (rev 61063)
@@ -30,7 +30,7 @@
 import wx
 from   wx.lib.newevent import NewEvent
 from   wx              import glcanvas
-from wx.glcanvas       import WX_GL_DOUBLEBUFFER, WX_GL_DEPTH_SIZE
+from wx.glcanvas       import WX_GL_RGBA, WX_GL_DOUBLEBUFFER, WX_GL_DEPTH_SIZE
 
 import grass.script as grass
 from grass.pydispatch.signal import Signal
@@ -80,15 +80,15 @@
         self.lmgr = lmgr
         self.frame = frame
 
+        attribs=[WX_GL_RGBA, WX_GL_DOUBLEBUFFER]
         # for wxGTK we need to set WX_GL_DEPTH_SIZE to draw vectors correctly
         # but we don't know the right value
         # in wxpython 2.9, there is IsDisplaySupported
         if CheckWxVersion(version=[2, 8, 11]) and \
            sys.platform not in ('win32', 'darwin'):
             depthBuffer = int(UserSettings.Get(group='display', key='nvizDepthBuffer', subkey='value'))
-            attribs=[WX_GL_DOUBLEBUFFER, WX_GL_DEPTH_SIZE, depthBuffer, 0]
-        else:
-            attribs=[WX_GL_DOUBLEBUFFER, 0]
+            attribs.extend([WX_GL_DEPTH_SIZE, depthBuffer])
+        attribs.append(0)
 
         glcanvas.GLCanvas.__init__(self, parent, id, attribList=attribs)
 



More information about the grass-commit mailing list