Alpha test
should do it... it's what's done for sprites, and the principle is the same... you might also need a glDepthMask before and after, though...
Couple of points to note, however:
* Alpha test will give you a hard edge, you might want to experiment with GL_BLEND for hair and muzzleflashes
* You'll probably also want to set colour 255 to 0 in VID_SetPalette; like so:
Code: Select all
void VID_SetPalette (unsigned char *palette)
{
byte *pal;
unsigned r,g,b;
unsigned v;
unsigned short i;
unsigned *table;
// 8 8 8 encoding
pal = palette;
table = d_8to24table;
for (i = 0; i < 256; i++)
{
r = pal[0];
g = pal[1];
b = pal[2];
pal += 3;
v = (255 << 24) + (r << 0) + (g << 8) + (b << 16);
*table++ = v;
}
// 255 is transparent
d_8to24table[255] = 0;
}
Otherwise you'll have pink fringes around your opaque parts, which is just plain silly.