Colorkeying...?

Started by
1 comment, last by Metus 22 years, 8 months ago
Is there any (easy) way to implement colormasking via colorkeys? Exampel: glBindTexture(GL_TEXTURE_2D. Texture): glIgnoreColor3f(1.0f, 0.0f, 0.0f); //do NOT draw RED glBegin(GL_QUADS): ... glEnd();
Ethereal
Advertisement
To suppress a component, you have:

void glColorMask(
GLboolean red,
GLboolean green,
GLboolean blue,
GLboolean alpha
);

But for only one color, take a look at Nehe tutorial on masking.
Go with masking or (preferably) alpha testing (or alpha blending if you want to go all the way). You can write some relatively simple wrapper code to insert the alpha bytes into data as it is loaded based on a color that your provide fairly easily.

[Resist Windows XP''s Invasive Production Activation Technology!]

This topic is closed to new replies.

Advertisement