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
    20

    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...

Similar Threads

  1. Avoid Blending with Background when Blending Quads
    By Aboleoneo in forum OpenGL: Basic Coding
    Replies: 1
    Last Post: 09-05-2017, 05:54 PM
  2. Replies: 1
    Last Post: 05-01-2013, 09:37 PM
  3. Blending
    By Swiftless in forum OpenGL: Basic Coding
    Replies: 3
    Last Post: 12-07-2005, 01:53 AM
  4. modelling interference fringes
    By yadu in forum OpenGL: Basic Coding
    Replies: 4
    Last Post: 06-08-2005, 02:07 AM
  5. Blending
    By ltrain_riders in forum OpenGL: Basic Coding
    Replies: 1
    Last Post: 12-03-2002, 02:35 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Proudly hosted by Digital Ocean