Jump to content
  • Advertisement


This topic is now archived and is closed to further replies.

Claus Hansen Ries

OpenGL Opengl, multitextureing, pic combine methods

This topic is 6581 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

i got uploading texture, linking funcs, tex coordiantes, but how to do you select how the two textures are combined/blended ?? like add, multiply, substract, and so on.. and while we are at it, are there something like chormakeying without using the alpha (alphatest) channel posible ( or how to ) like in glide where you specify a color for rejecting pixels ?? i dont use glut... Edited by - claus hansen ries on 6/15/00 7:35:56 AM

Share this post

Link to post
Share on other sites

To select how the textures are blended, you use glBlendFunc. To multiply, use glBlendFunc(GL_DST_COLOR, GL_ZERO) or glBlenFunc(GL_ZERO, GL_SRC_COLOR). To Add, set your Alpha source colour to 1, and use glBlendFunc(GL_SRC_ALPHA, GL_SRC_ALPHA), and so on.
From what I know, the only way of implementing ColourKeying is using alpha... not necessarily the Alpha Test, you can do it using the Alpha channel of the texture too (I think it''s simpler that way). Would be nice if an extension were created for this.

Hope that helps,


"When everything goes well, something will go wrong." - Murphy

Share this post

Link to post
Share on other sites

  • Advertisement

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

Participate in the game development conversation and more when you create an account on GameDev.net!

Sign me up!