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

Thread: Window on a textured wall

  1. #1
    Junior Member Newbie
    Join Date
    Jan 2003
    Posts
    2

    Window on a textured wall

    I have a textured wall that consists of 2 GL_QUAD object (2x4=8 points) (so the wall has thickness) but I don't know how to put a window on it so that you can see through the window what's behind the wall. If someone knows the answer, please write down the order of rendering (first the elements of the wall, then the window or vica versa?) as well.

  2. #2
    Junior Member Regular Contributor
    Join Date
    Nov 2002
    Location
    Minnesota, US
    Posts
    180

    Re: Window on a textured wall

    Well how about you make each piece of the wall 4 quads. So you would have 8 in total. That way you could have a quad on the left of the window, on the right of the window and on the top and bottom of the window.

    - Halcyon
    "Programming is an art form that fights back."

    - I forgot who said it!

  3. #3
    Intern Contributor
    Join Date
    Nov 2002
    Location
    Torun/Poland
    Posts
    58

    Re: Window on a textured wall

    If you use tga images and well designed
    alpha channel you won't have any problem with transparency

  4. #4
    Senior Member OpenGL Guru
    Join Date
    Jun 2000
    Location
    Gastonia, NC, USA
    Posts
    2,070

    Re: Window on a textured wall

    I agree the simplest way would be to use a apha mask to create a transparent areas for the windows.
    Just draw your windows on your texture and make the glass transparent via a apha mask.

    Any good paint program will support apha channel and saving to TGA file formation.

    nehe.gamedev.net has a good tutor on it.

    Originally posted by LordOfTheUniverse:
    If you use tga images and well designed
    alpha channel you won't have any problem with transparency

Posting Permissions

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