[libgis] Add support for hidden objects



commit 6b903c96fdc3552f0133060487293c1b927638c4
Author: Andy Spencer <andy753421 gmail com>
Date:   Wed May 5 05:51:23 2010 +0000

    Add support for hidden objects

 src/gis-opengl.c         |    4 ++++
 src/objects/gis-object.h |    1 +
 2 files changed, 5 insertions(+), 0 deletions(-)
---
diff --git a/src/gis-opengl.c b/src/gis-opengl.c
index d01a23c..11c489b 100644
--- a/src/gis-opengl.c
+++ b/src/gis-opengl.c
@@ -288,6 +288,10 @@ static void _draw_callback(GisOpenGL *opengl, GisCallback *callback)
 static void _draw_object(GisOpenGL *opengl, GisObject *object)
 {
 	//g_debug("GisOpenGL: draw_object");
+	/* Skip hidden objects */
+	if (object->hidden)
+		return;
+
 	/* Skip out of range objects */
 	if (object->lod > 0) {
 		/* LOD test */
diff --git a/src/objects/gis-object.h b/src/objects/gis-object.h
index 1777fce..6763a5f 100644
--- a/src/objects/gis-object.h
+++ b/src/objects/gis-object.h
@@ -36,6 +36,7 @@ typedef struct _GisObjectClass GisObjectClass;
 struct _GisObject {
 	GObject  parent_instance;
 	GisPoint center;
+	gboolean hidden;
 	gdouble  lod;
 };
 



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]