Skip to main content
GameDev.net gamedev.net
🔒 Locked

picture alpha problem : FIXED

Started by SMcNeil Aug 7, 2006 at 3:23 PM 2 replies 400+ views
Original Post
SMcNeil
SMcNeil
Hi guys, I just wrote my first Particle class and noticed something that I now need to fix and I'm not sure how to fix it. If you notice the picture of the particle stream you'll see the outline of the particle tga picture. I think this is due to the alpha component of the tga picture. My first quesiton is this due to not reading in the alpha component of the tga file correctly? Or is there something that I can do with OpenGL to fix this problem. "glBlendFunc(GL_SRC_ALPHA,GL_ONE)" and "glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA)" don't fix the problem. Anything else I might be able to try? particle Thanks, Sabrina
SMcNeil
SMcNeil
Hi Anonymous Poster,

Thanks for the help :)

Since its Monday, I must not be thinking all that clearly! I got it to work.
I used a dirrent blending function: "glBlendFunc(GL_SRC_ALPHA,GL_ONE)" instead of
"glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA)". I thought I had tested the first blending function prior to posting here, but again I guess its a Monday thingy. Sorry guys!

Thanks again.

Sabrina.


Addition: I did have to turn off the "glEnable(GL_DEPTH_TEST)", do I have to turn this off everytime I render any particles?

Topic Locked

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

Sign in to reply to this topic.