Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTon Roosendaal <ton@blender.org>2006-07-13 14:55:25 +0400
committerTon Roosendaal <ton@blender.org>2006-07-13 14:55:25 +0400
commit3bc73506eadf532a9c84cfcc7ff7d21b9d0d65dc (patch)
treed1ec17991ab98b72ed07c917422220b0a708680a
parent2899d1da35b9e24aad2374164e0d18d541932c4a (diff)
Thanks Brecht && Valgrind!
Octree filling code used an unitialized vector. Only when a quad once was rendered it was filled with a value, explaining the weirdness we suffer...
-rw-r--r--source/blender/render/intern/source/ray.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/source/blender/render/intern/source/ray.c b/source/blender/render/intern/source/ray.c
index 1847666d8d6..cb2004e901d 100644
--- a/source/blender/render/intern/source/ray.c
+++ b/source/blender/render/intern/source/ray.c
@@ -308,8 +308,10 @@ static void ocwrite(Octree *oc, VlakRen *vlr, short x, short y, short z, float r
no->v[a]= vlr;
- calc_ocval_face(rtf[0], rtf[1], rtf[2], rtf[3], x>>2, y>>1, z, &no->ov[a]);
-
+ if(vlr->v4)
+ calc_ocval_face(rtf[0], rtf[1], rtf[2], rtf[3], x>>2, y>>1, z, &no->ov[a]);
+ else
+ calc_ocval_face(rtf[0], rtf[1], rtf[2], NULL, x>>2, y>>1, z, &no->ov[a]);
}
static void d2dda(Octree *oc, short b1, short b2, short c1, short c2, char *ocface, short rts[][3], float rtf[][3])