Jump to content

  • Log In with Google      Sign In   
  • Create Account


Colorkeying...?


Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.

  • You cannot reply to this topic
2 replies to this topic

#1 Metus   Members   -  Reputation: 168

Like
Likes
Like

Posted 02 August 2001 - 09:00 PM

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();

Sponsor:

#2 bobatefrei   Members   -  Reputation: 122

Like
Likes
Like

Posted 02 August 2001 - 09:25 PM

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.

#3 Null and Void   Moderators   -  Reputation: 1087

Like
Likes
Like

Posted 02 August 2001 - 09:27 PM

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!]




Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.



PARTNERS