Hello,
 
To set the solor of a Triapi particle, use the Color4f function.
You can set the three color ( 0.0 -> 1.0, so, to get a yellow, you
can set 255/255.0, 255/255.0, 0/255.0 = 1.0, 1.0, 0.0 ). Besides,
you can set the alpha value ( forth argument ).
 
Be careful with the color ! The TriApi color isn't active on
Permedia 2 GPU ! And on my GeForce 3, the color appears sometimes,
and if I walk around the particle, color disappears :( So,
I made a colored sprite !
 
 
--------------------------------------------------------
Cortex
HL Albator coder & mapper
www.hlalbator.fr.st
--------------------------------------------------------
----- Original Message -----
Sent: Friday, December 14, 2001 12:57 AM
Subject: RE: [hlcoders] Particle colors?

> What is the trick to setting a particle's color? I've tried using
> the sample
> Particles() test code in the entity.cpp file (cl_dll stuff) and resetting
> the the rgb values to white (255,255,255) but all I get is a dirty grey
> color. I tried setting it to yellow (255,255,0) but all I get is a dirty
> grey color. The red color in the sample code comes out a dirty
> reddish grey.
> What gives? How do you get a bright white or yellow particle? I'm also
> curious what the story is with the color being packed in a short.
> Last time
> I looked, 24 bits of RGB won't fit into a short.

IIRC, it uses an indexed pallette, like blood colors use. I'm not sure what
indices correspond to which RGB values, though. Anyone else have this info?

-James "Corvidae" Williams ([EMAIL PROTECTED])
Administrator, Wavelength Forums (http://www.planethalflife.com/wavelength)
Co-Leader / Coder, Underhive (http://www.underhive.com)

Reply via email to