Results 1 to 2 of 2

Thread: Blending

  1. #1
    Member Contributor
    Join Date
    Mar 2000
    Leiden, The Netherlands


    Hi all,

    does someone know if it is possible to use different blending techniques (like
    Code :
    glBelndFunc(GL_ONE, GL_ZERO);
    Code :
     glBlendFunc(GL_SRC_ALPHA, GL_DST_ALPHA))
    without one interfering with the other?
    Or maybe it has a fixed calling sequence like:
    Code :
    // Draw something 
    My problem is that when a particular
    Code :
    is used, I cannot change this blending for the same scene.

    Thanx in advance ,

    Daniel Palomo van Es

  2. #2
    Senior Member OpenGL Pro
    Join Date
    Jun 2000
    Shreveport, LA, USA

    Re: Blending

    If you are asking what I think your are asking, sure you can. But it takes a bit more work. First you draw all opaque objects. Next, you need to depth sort all transparent or filtered polygons. And then to be absolutely perfect you should split intersecting transparent polygons so that the depth sorting can be perfect (I rarely do the splitting since things tend to constantly move in my apps and the flaw isn't really noticeable, for largely static scenes I would do the splitting.) Then draw all the transparent polygons from far to near with depth writes disabled, but depth testing enabled.

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. Bad Blending
    By glBomb in forum OpenGL: Basic Coding
    Replies: 2
    Last Post: 08-23-2006, 05:01 AM
  4. Blending
    By Swiftless in forum OpenGL: Basic Coding
    Replies: 3
    Last Post: 12-07-2005, 01:53 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