[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [14082] trunk/blender/source/blender/src/ drawview.c:

Brecht Van Lommel brechtvanlommel at pandora.be
Thu Mar 13 11:27:35 CET 2008


Revision: 14082
          http://projects.blender.org/plugins/scmsvn/viewcvs.php?view=rev&root=bf-blender&revision=14082
Author:   blendix
Date:     2008-03-13 11:27:35 +0100 (Thu, 13 Mar 2008)

Log Message:
-----------

Attempted fix for bug #8441: editing in particle mode with limit visible
enabled is really slow on some cards. Cause might be the large number of
calls to glReadPixels, now it uses the same system as sculpt to store
the depths once, code was already there for the case those depths were
available, it just wasn't storing them.

Modified Paths:
--------------
    trunk/blender/source/blender/src/drawview.c

Modified: trunk/blender/source/blender/src/drawview.c
===================================================================
--- trunk/blender/source/blender/src/drawview.c	2008-03-13 10:24:40 UTC (rev 14081)
+++ trunk/blender/source/blender/src/drawview.c	2008-03-13 10:27:35 UTC (rev 14082)
@@ -2897,7 +2897,7 @@
 	Base *base;
 	Object *ob;
 	Scene *sce;
-	char retopo, sculpt;
+	char retopo, sculptparticle;
 	Object *obact = OBACT;
 	
 	/* update all objects, ipos, matrices, displists, etc. Flags set by depgraph or manual, 
@@ -3026,7 +3026,7 @@
 	}
 
 	retopo= retopo_mesh_check() || retopo_curve_check();
-	sculpt= (G.f & G_SCULPTMODE) && !G.obedit;
+	sculptparticle= (G.f & (G_SCULPTMODE|G_PARTICLEEDIT)) && !G.obedit;
 	if(retopo)
 		view3d_update_depths(v3d);
 
@@ -3038,8 +3038,9 @@
 		}
 	}
 
-	if(!retopo && sculpt && !(obact && (obact->dtx & OB_DRAWXRAY))) {
-		draw_sculpt_depths(v3d);
+	if(!retopo && sculptparticle && !(obact && (obact->dtx & OB_DRAWXRAY))) {
+		if(G.f & G_SCULPTMODE)
+			draw_sculpt_depths(v3d);
 		view3d_update_depths(v3d);
 	}
 
@@ -3056,8 +3057,9 @@
 	view3d_draw_xray(v3d, 0);	// clears zbuffer if it is used!
 	view3d_draw_transp(v3d, 0);
 
-	if(!retopo && sculpt && (obact && (OBACT->dtx & OB_DRAWXRAY))) {
-		draw_sculpt_depths(v3d);
+	if(!retopo && sculptparticle && (obact && (OBACT->dtx & OB_DRAWXRAY))) {
+		if(G.f & G_SCULPTMODE)
+			draw_sculpt_depths(v3d);
 		view3d_update_depths(v3d);
 	}
 	





More information about the Bf-blender-cvs mailing list