Jump to content
  • Advertisement
Sign in to follow this  

Controlling model transparency [SOLVED]

This topic is 3161 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 was wondering if it is possible to control textured model transparency accordingly:
void drawStuff() {
  setTransparency(alpha); // set transparency for model.
  glDrawElements(...);    // draw model with transparency
/* ... */

void setTransparency(float alpha) {
   *  ?

I'm looking for a solution which is something like this. Is this possible? As I was researching this I noticed glTexEnv was mentioned few times, but I don't quite get it :| EDIT: Adding following code solved the case:
my problem was that I had the "glEnable(GL_COLOR_MATERIAL);" missing. I think this is because I had lighting enabled. [Edited by - rxa on February 23, 2010 11:20:21 PM]

Share this post

Link to post
Share on other sites
Sign in to follow this  

  • Advertisement

Important Information

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

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!