should use set_color_scale(), not set_color(), to fade out geom particles

This commit is contained in:
David Rose 2004-09-17 21:07:52 +00:00
parent f6556fec72
commit 52615b0da5

View File

@ -20,7 +20,7 @@
#include "baseParticle.h"
#include "transformState.h"
#include "colorAttrib.h"
#include "colorScaleAttrib.h"
////////////////////////////////////////////////////////////////////
// Function : GeomParticleRenderer
@ -194,7 +194,7 @@ render(pvector< PT(PhysicsObject) >& po_vector, int ttl_particles) {
alpha_scalar *= get_user_alpha();
}
cur_node->set_attrib(ColorAttrib::make_flat
cur_node->set_attrib(ColorScaleAttrib::make
(Colorf(1.0f, 1.0f, 1.0f, alpha_scalar)));
}