blending interference

Hi, I’m having trouble with blending… I’m using a few different types of blending throughout my program.
I use:
glBlendFunc(GL_SRC_ALPHA,GL_ONE);
in two diffent places currently and they seem to have effects on the other. I am using glDisable after all drawing. I thought that this was enough now I’m wondering if it really is. Do I need to use glPushAttrib? Currently testing on a riva128 if that makes a difference.

Thanks

Well I’ve fixed it… Seems it had something
to do with glEnable(GL_LIGHTING)/glDisable(GL_LIGHTING)

Still not exactly sure why? If anyone has something so say on this I’d appreciate any info you can give me as to why. Maybe I shouldnt disable lighting during blending?

how exactly is your other geometry being effected? is it slightly transparent?

i had a problem like this not too long ago when i was adding detail textures to my terrain renderer, i fixed it by setting the depth buffer mode to LEQUAL.

glDepthFunc(GL_LEQUAL);

I was drawing some particles with
glBlendFunc(GL_SRC_ALPHA,GL_ONE)
glColor4f(1,1,1,p->alpha)
and some geometry with
glBlendFunc(GL_SRC_ALPHA,GL_ONE)
glColor4f(1,1,1,obj->alpha)

where obj->alpha was always 1 and p->alpha
varied. What happen was my geometry was being drawn transparent when it should have been totaly opaque(sp?)

I was disabling the lighting for the particles… so I took it out and that fixed it :stuck_out_tongue:

UGH!!! there was a rouge “disable
lighting” call in my shadows function!
man I feel so dumb now I almost didnt
post this LOL…