Jump to content

Image of the Day

What's the best way to move your heavy stuff? Using a power loader! #spacr #screenshotsaturday 💪🤖💪 https://t.co/sOjz2XNVeq
IOTD | Top Screenshots

The latest, straight to your Inbox.

Subscribe to GameDev.net's newsletters to receive the latest updates and exclusive content.


Sign up now

Colorkeying...?

4: Adsense

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   

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

#2 bobatefrei   Members   

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   Members   

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.