Sign in to follow this  

changing transparancy on the fly

This topic is 4303 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
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

This topic is 4303 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.

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