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

Thread: TT

  1. #1
    Junior Member Regular Contributor
    Join Date
    Jun 2000
    Location
    Brazil
    Posts
    152

    TT

    hey guys...
    how can i make any color of my tga texture transparent ???

    thanks in advance...

  2. #2
    Intern Newbie
    Join Date
    Aug 2001
    Location
    Switzerland
    Posts
    44

    Re: TT

    You have to turn on blending, I think.

    maybe something like this:

    glEnable(GL_BLEND);
    glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);
    glEnable(GL_DEPTH_TEST);

    But with blended trinagles you should proceed the following:

    1. draw all non-transparent primitives
    2. code above
    3. draw your transparent primitives depth-sorted(furthest first, nearest last)

    if primitives are texture-mapped or not doesn't matter.

    qwert

Posting Permissions

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