Skip to main content
GameDev.net gamedev.net
๐Ÿ”’ Locked

fading

Started by trager Jan 9, 2004 at 12:43 PM 1 replies 250+ views
Original Post
trager
trager
Im slightly confused by the blending functions in opengl. Im using textured planes as sprites but when I try fading the colours seem to get cortupt. The sprites usually ending up really bright or if they have a lot of greys in them they turn transparent. Can anyone help me make a nice fading function, so I can make the sprite more or less transparent. Thanks.
merlin9x9
merlin9x9
If you're after the standard alpha blending function, it's GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA, if I recall correctly. But remember that you need to enable blending first with glEnable(GL_BLEND).

[edited by - merlin9x9 on January 9, 2004 1:46:51 PM]
trager
trager
Thanks Merlin

Less than one minute from post to solution most chuffed.

again thanks lots.

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.