[GRASS-dev] wxNviz rendering order problem

Michael Barton Michael.Barton at asu.edu
Sun Mar 3 12:24:21 PST 2013


Anna,

I have not noticed this particular problem on the Mac and I DO use wxPython 2.8.12.

I've noticed a different issue of vector colors, but not this. I will try to recompile with these changes and see if it makes any difference in anything.

Michael
____________________
C. Michael Barton
Director, Center for Social Dynamics & Complexity
Professor of Anthropology, School of Human Evolution & Social Change
Arizona State University

voice:  480-965-6262 (SHESC), 480-727-9746 (CSDC)
fax:          480-965-7671 (SHESC),  480-727-0709 (CSDC)
www: http://www.public.asu.edu/~cmbarton, http://csdc.asu.edu



On Mar 3, 2013, at 1:00 PM, <grass-dev-request at lists.osgeo.org<mailto:grass-dev-request at lists.osgeo.org>>
 wrote:

From: Anna Kratochvílová <kratochanna at gmail.com<mailto:kratochanna at gmail.com>>
Subject: [GRASS-dev] wxNviz rendering order problem
Date: March 3, 2013 11:46:21 AM MST
To: GRASS-dev <grass-dev at lists.osgeo.org<mailto:grass-dev at lists.osgeo.org>>, Helena Mitasova <hmitaso at ncsu.edu<mailto:hmitaso at ncsu.edu>>, Glynn Clements <glynn at gclements.plus.com<mailto:glynn at gclements.plus.com>>


Hi,

I have recently noticed strange behavior of wxNviz, for example vector
layer is always visible even if I use negative z coordinate and it
should be hidden below a surface. Probably, it is connected to newer
wxPython version I started to use recently (2.8.12, so it's actually
not new at all). According to the discussion [1], I tried these lines:

Index: nviz/mapwindow.py
===================================================================
--- nviz/mapwindow.py   (revision 55276)
+++ nviz/mapwindow.py   (working copy)
@@ -72,8 +72,10 @@
    def __init__(self, parent, id = wx.ID_ANY,
                 Map = None, tree = None, lmgr = None):
        self.parent = parent # MapFrame
-        glcanvas.GLCanvas.__init__(self, parent, id)
+        from wx.glcanvas import WX_GL_DEPTH_SIZE
+        attribs=[WX_GL_DEPTH_SIZE,16,0]
+        glcanvas.GLCanvas.__init__(self, parent, id, attribList=attribs)
        MapWindow.__init__(self, parent, id,
                           Map, tree, lmgr)

which solved the problem. So, I would like to know if someone noticed
this problem on other platforms than Linux. It's not clear to me if
these lines are harmless or not for other platforms and if the number
of the WX_GL_DEPTH_SIZE (= 16) can be used safely (probably different
number works on different computers, see also [2]).

Thanks for any info,
Anna


[1] http://wxpython-users.1045709.n5.nabble.com/OpenGL-depth-buffer-deosn-t-seem-to-work-in-wx-glcanvas-td5714984.html#a5714991
[2] http://stackoverflow.com/questions/14715739/how-can-i-determine-the-max-allowable-wx-gl-depth-size-for-a-wx-glcanvas



-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/grass-dev/attachments/20130303/d2f2bbf7/attachment-0001.html>


More information about the grass-dev mailing list