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 6 of 6

Thread: only make some faces transparend

  1. #1

    only make some faces transparend

    hi
    does one of you know, how i can make opengl to use alpha blending only for some of my GL_QUADS?
    thx in advance
    Harry

  2. #2
    Intern Contributor
    Join Date
    Aug 2000
    Location
    france
    Posts
    89

    Re: only make some faces transparend

    Hi, if u know which of ur quads must be blended, u should group them like this:

    glBegin(GL_QUADS);
    //**** the quads blended
    glEnable(GL_BLEND);
    glBlendFunc(Ur_blend_func);
    draw_the_blended_quads;
    glDisable(GL_BLEND);
    draw_the_other_quads;
    glEnd();

    I don't if it works but u can try it

  3. #3

    Re: only make some faces transparend

    Thank you, i always used the
    glEnable(blending****)
    command
    before calling
    glBegin(GL_QUADS)
    thank you

  4. #4

    Re: only make some faces transparend

    I just tries to use your version.
    but it does not work
    do you (or someone else) know a working sollution?
    this would be very nice of you
    cu

  5. #5

    Re: only make some faces transparend

    ok, now i found the sollution.
    i have to draw the transparent objects after drawing all the others.
    ok thanx
    bye

  6. #6
    Intern Newbie
    Join Date
    May 2000
    Location
    Mesa, Arizona USA
    Posts
    30

    Re: only make some faces transparend

    Keep in mind that depending on the effect you are trying to achieve, you will either have to draw the transparent objects in order from furthest to nearest, -or- make the depth buffer read-only before drawing your unordered transparent quads. If you don't make the depth buffer read-only, any transparent quad which is directly behind another transparent quad won't get drawn if the nearer quad is rendered first.

    Good Luck!

    MikeM

    [This message has been edited by MikeM (edited 08-11-2000).]

Posting Permissions

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