I just tried this, and it turns out that I DO get the same result you do. Also, trying to view any 3D vector in nviz gives the following error:
Starting 3D view mode…
Loading raster map elevation@PERMANENT…
Loading raster map elevation@PERMANENT…
Translating colors from raster map elevation@PERMANENT…
Vector map <firestations3D@grass7vect_sqlite> loaded (7
points)
No features from vector map
<firestations3D@grass7vect_sqlite> fall within current
region
Error loading vector map <firestations3D@grass7vect_sqlite>
Loading vector map <firestations3D@grass7vect_sqlite> (lines) failed
Unfortunately, your fix does not work for me. Changing /nviz/mapwindow.py at line 76 to …
from wx.glcanvas import WX_GL_DEPTH_SIZE
attribs=[WX_GL_DEPTH_SIZE,16,0]
glcanvas.GLCanvas.init(self, parent, id, attribList=attribs)
…breaks nviz entirely. Even rasters won’t display after this code change. Here is the error in the console:
glcanvas.GLCanvas.init(self, parent, id,
attribList=attribs)
File “/Applications/GRASS/GRASS-7.0.app/Contents/MacOS/etc
/python/wx/glcanvas.py”, line 103, in init
_glcanvas.GLCanvas_swiginit(self,_glcanvas.new_GLCanvas(*arg
s, **kwargs))
wx._core
.
PyAssertionError
:
C++ assertion “fmt” failed at /BUILD/wxPython-
src-2.8.12.1/src/mac/carbon/glcanvas.cpp(228) in Create():
Couldn’t create OpenGl pixel format
The terminal window gives a different error:
Exception AttributeError: “‘GLWindow’ object has no attribute ‘timerAnim’” in <bound method GLWindow.del of <nviz.mapwindow.GLWindow; >> ignored
I’m using GRASS 7 r55179
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:24 PM, Michael Barton <michael.barton@asu.edu> wrote:
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 Universityvoice: 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@lists.osgeo.org>
wrote:From: Anna Kratochvílová <kratochanna@gmail.com>
Subject: [GRASS-dev] wxNviz rendering order problem
Date: March 3, 2013 11:46:21 AM MST
To: GRASS-dev <grass-dev@lists.osgeo.org>, Helena Mitasova <hmitaso@ncsu.edu>, Glynn Clements <glynn@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