[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [16173] branches/apricot/source/blender/ src/previewrender.c: Apricot Branch: fix some missing updates for GLSL materials

Brecht Van Lommel brechtvanlommel at pandora.be
Mon Aug 18 15:25:28 CEST 2008


Revision: 16173
          http://projects.blender.org/plugins/scmsvn/viewcvs.php?view=rev&root=bf-blender&revision=16173
Author:   blendix
Date:     2008-08-18 15:25:27 +0200 (Mon, 18 Aug 2008)

Log Message:
-----------
Apricot Branch: fix some missing updates for GLSL materials
when changing world settings. Thanks Pablo for the patch,
though I implemented it a bit differently.

Modified Paths:
--------------
    branches/apricot/source/blender/src/previewrender.c

Modified: branches/apricot/source/blender/src/previewrender.c
===================================================================
--- branches/apricot/source/blender/src/previewrender.c	2008-08-18 13:06:33 UTC (rev 16172)
+++ branches/apricot/source/blender/src/previewrender.c	2008-08-18 13:25:27 UTC (rev 16173)
@@ -224,11 +224,20 @@
 		}
 	}
 
-	if(ELEM3(id_code, ID_MA, ID_TE, ID_LA)) {
+	if(ELEM4(id_code, ID_MA, ID_TE, ID_LA, ID_WO)) {
 		Object *ob;
 		Material *ma;
 
-		if(id_code == ID_LA) {
+		if(id_code == ID_WO) {
+			for(ma=G.main->mat.first; ma; ma=ma->id.next) {
+				if(ma->gpumaterial) {
+					GPU_material_free(ma->gpumaterial);
+					ma->gpumaterial= NULL;
+					allqueue(REDRAWVIEW3D, 0);
+				}
+			}
+		}
+		else if(id_code == ID_LA) {
 			for(ob=G.main->object.first; ob; ob=ob->id.next) {
 				if(ob->gpulamp) {
 					GPU_lamp_free(ob->gpulamp);





More information about the Bf-blender-cvs mailing list