[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [17095] trunk/blender/source/blender/src/ drawobject.c: Fix for bug #17829: with ATI drivers, GLSL shadows crashed on physics

Brecht Van Lommel brecht at blender.org
Fri Oct 17 15:36:40 CEST 2008


Revision: 17095
          http://projects.blender.org/plugins/scmsvn/viewcvs.php?view=rev&root=bf-blender&revision=17095
Author:   blendix
Date:     2008-10-17 15:36:40 +0200 (Fri, 17 Oct 2008)

Log Message:
-----------
Fix for bug #17829: with ATI drivers, GLSL shadows crashed on physics
'show pivot' drawing in the viewport. Also added checks for some other
cases where this could happen.

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

Modified: trunk/blender/source/blender/src/drawobject.c
===================================================================
--- trunk/blender/source/blender/src/drawobject.c	2008-10-17 13:34:20 UTC (rev 17094)
+++ trunk/blender/source/blender/src/drawobject.c	2008-10-17 13:36:40 UTC (rev 17095)
@@ -3400,7 +3400,7 @@
 				}
 				if(next_pa)
 						continue;
-				if(part->draw&PART_DRAW_NUM){
+				if(part->draw&PART_DRAW_NUM && !(G.f & G_RENDER_SHADOW)){
 					/* in path drawing state.co is the end point */
 					glRasterPos3f(state.co[0],  state.co[1],  state.co[2]);
 					sprintf(val," %i",a);
@@ -3709,7 +3709,7 @@
 				}
 				cd += (timed?4:3) * pa->totkey;
 
-				if(pset->flag&PE_SHOW_TIME && (pa->flag&PARS_HIDE)==0){
+				if((pset->flag&PE_SHOW_TIME) && (pa->flag&PARS_HIDE)==0 && !(G.f & G_RENDER_SHADOW)){
 					for(k=0, key=edit->keys[i]+k; k<pa->totkey; k++, key++){
 						if(key->flag & PEK_HIDE) continue;
 
@@ -3736,7 +3736,7 @@
 					glVertex3fv(key->world_co);
 					glEnd();
 
-					if(pset->flag & PE_SHOW_TIME){
+					if((pset->flag & PE_SHOW_TIME) && !(G.f & G_RENDER_SHADOW)){
 						glRasterPos3fv(key->world_co);
 						sprintf(val," %.1f",*key->time);
 						BMF_DrawString(G.font, val);
@@ -4326,6 +4326,9 @@
 	float vec[3]= {0.0, 0.0, 0.0};
 	int curcol;
 	float size;
+
+	if(G.f & G_RENDER_SHADOW)
+		return;
 	
 	if(ob!=G.obedit && (ob->flag & SELECT)) {
 		if(ob==OBACT) curcol= TH_ACTIVE;
@@ -4732,17 +4735,18 @@
 	}
 }
 
-
 //<rcruiz>
-void drawRBpivot(bRigidBodyJointConstraint *data){
+void drawRBpivot(bRigidBodyJointConstraint *data)
+{
 	float radsPerDeg = 6.283185307179586232f / 360.f;
 	int axis;
 	float v1[3]= {data->pivX, data->pivY, data->pivZ};
 	float eu[3]= {radsPerDeg*data->axX, radsPerDeg*data->axY, radsPerDeg*data->axZ};
-	
+	float mat[4][4];
 
+	if(G.f & G_RENDER_SHADOW)
+		return;
 
-	float mat[4][4];
 	EulToMat4(eu,mat);
 	glLineWidth (4.0f);
 	setlinestyle(2);





More information about the Bf-blender-cvs mailing list