Jump to content
  • Advertisement
Sign in to follow this  
Muncher

changing transparancy on the fly

This topic is 4466 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've loaded an RGBA image into a texture and am displaying it onto the screen with the transparent bits working. Is it possible to make the image more transparent or more opaque on the fly? I've tried using glColor4f() with a varying alpha component and it doesnt work; i guess it would be pretty easy to do with a fragment shader, but is there a standard gl call to do it?

Share this post


Link to post
Share on other sites
Advertisement
glColor4f should work fine, if your texture function includes the vertex color into its calculation.

Odds are you're using GL_REPLACE to draw the texture as-is. Have you tried GL_MODULATE?

Share this post


Link to post
Share on other sites
right on the money bpoint; setting the glTexEnvi() to use modulate works nicely :) thankyou soooooo much

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.

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

Sign me up!