Sign in to follow this  

Controlling model transparency [SOLVED]

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

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this