Part of the Khronos Group
OpenGL.org

The Industry's Foundation for High Performance Graphics

from games to virtual reality, mobile phones to supercomputers

Results 1 to 5 of 5

Thread: blending interference

  1. #1
    Guest

    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

  2. #2
    Guest

    Re: blending interference

    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?

  3. #3
    Junior Member Newbie
    Join Date
    Dec 2000
    Location
    Appleton, WI, USA
    Posts
    15

    Re: blending interference

    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);
    -brian ploeckelman
    plucky@lumiere.net

  4. #4
    Guest

    Re: blending interference

    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

  5. #5
    Guest

    Re: blending interference

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

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •