[GRASS-SVN] r46798 - in grass/trunk: gui/wxpython/gui_modules include lib/nviz

svn_grass at osgeo.org svn_grass at osgeo.org
Mon Jun 27 08:11:43 EDT 2011


Author: annakrat
Date: 2011-06-27 05:11:43 -0700 (Mon, 27 Jun 2011)
New Revision: 46798

Modified:
   grass/trunk/gui/wxpython/gui_modules/wxnviz.py
   grass/trunk/include/nviz.h
   grass/trunk/lib/nviz/lights.c
Log:
wxNviz: draw lighting model properly

Modified: grass/trunk/gui/wxpython/gui_modules/wxnviz.py
===================================================================
--- grass/trunk/gui/wxpython/gui_modules/wxnviz.py	2011-06-27 10:17:39 UTC (rev 46797)
+++ grass/trunk/gui/wxpython/gui_modules/wxnviz.py	2011-06-27 12:11:43 UTC (rev 46798)
@@ -1336,7 +1336,7 @@
     def DrawLightingModel(self):
         """!Draw lighting model"""
         if self.showLight:
-            GS_draw_lighting_model()
+            Nviz_draw_model(self.data)
 
     def SetFringe(self, sid, color, elev, nw = False, ne = False, sw = False, se = False):
         """!Set fringe

Modified: grass/trunk/include/nviz.h
===================================================================
--- grass/trunk/include/nviz.h	2011-06-27 10:17:39 UTC (rev 46797)
+++ grass/trunk/include/nviz.h	2011-06-27 12:11:43 UTC (rev 46798)
@@ -164,6 +164,7 @@
 int Nviz_set_light_ambient(nv_data *, int, double);
 int Nviz_init_light(nv_data *, int);
 int Nviz_new_light(nv_data *);
+int Nviz_draw_model(nv_data *);
 
 /* map_obj.c */
 int Nviz_new_map_obj(int, const char *, double, nv_data *);

Modified: grass/trunk/lib/nviz/lights.c
===================================================================
--- grass/trunk/lib/nviz/lights.c	2011-06-27 10:17:39 UTC (rev 46797)
+++ grass/trunk/lib/nviz/lights.c	2011-06-27 12:11:43 UTC (rev 46798)
@@ -177,3 +177,18 @@
     return 1;
 }
 
+/*!
+  \brief Draw lighting model
+
+  \param data nviz data
+*/
+int Nviz_draw_model(nv_data * data)
+{
+    GS_set_draw(GSD_FRONT);
+    GS_ready_draw();
+    GS_draw_lighting_model();
+    GS_done_draw();
+    GS_set_draw(GSD_BACK);
+    
+    return 1;
+}



More information about the grass-commit mailing list