Bugfix for particle path drawing messing up opengl state in some cases.
authorBrecht Van Lommel <brechtvanlommel@pandora.be>
Mon, 18 Feb 2008 11:29:08 +0000 (11:29 +0000)
committerBrecht Van Lommel <brechtvanlommel@pandora.be>
Mon, 18 Feb 2008 11:29:08 +0000 (11:29 +0000)
source/blender/src/drawobject.c

index c04561cc4b3a8fc548d9637dfee409e5bf564d38..7b1d6403efa6778deefec498410c99659b829554 100644 (file)
@@ -3426,12 +3426,12 @@ static void draw_new_particle_system(Base *base, ParticleSystem *psys)
                                glEnableClientState(GL_VERTEX_ARRAY);
                                glEnableClientState(GL_NORMAL_ARRAY);
                                glEnable(GL_LIGHTING);
+
+                               glColorMaterial(GL_FRONT_AND_BACK, GL_DIFFUSE);
                                glEnable(GL_COLOR_MATERIAL);
 
-                               if(part->draw&PART_DRAW_MAT_COL) {
+                               if(part->draw&PART_DRAW_MAT_COL)
                                        glEnableClientState(GL_COLOR_ARRAY);
-                                       glColorMaterial(GL_FRONT_AND_BACK, GL_DIFFUSE);
-                               }
 
                                if(totchild && (part->draw&PART_DRAW_PARENT)==0)
                                        totpart=0;