Results 1 to 3 of 3

Thread: Adding alpha value to texture

  1. #1
    Guest

    Adding alpha value to texture

    Hi, I have two textures which I want to draw above each other. One is the ground, the second one is a house (all in 2D). Now I set everything outside the house red, and now want to load the texture and let every red pixel have an alpha value from 0.0f. How can I do that or am I trying to do it the complete wrong way?

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

    Re: Adding alpha value to texture

    You use the alpha channel to create a mask of the area's that you want to see through.

    I use paint shop pro to make TGA images with the alpha channel, I am not sure about how to do it with other paint programs.

    this site has a good tutor on doing it, lession 33 or tutor 33. Show how do load and mask areas on an object.

    nehe.gamedev.net

    Originally posted by The stupid Beginner:
    Hi, I have two textures which I want to draw above each other. One is the ground, the second one is a house (all in 2D). Now I set everything outside the house red, and now want to load the texture and let every red pixel have an alpha value from 0.0f. How can I do that or am I trying to do it the complete wrong way?

  3. #3
    Senior Member Regular Contributor
    Join Date
    Jul 2000
    Location
    Arlon, Belgium
    Posts
    477

    Re: Adding alpha value to texture

    Hi,

    On my site, you'll find a simple progream for displaying a tree with alpha chanel.
    http://ibelgique.ifrance.com/Slug-Production/

Similar Threads

  1. Adding bmp image to gluSphere as texture
    By MrFuzzums in forum OpenGL: Basic Coding
    Replies: 7
    Last Post: 11-30-2009, 12:14 AM
  2. help -> adding texture on gluSphere
    By imported_miroslav_karpis in forum OpenGL: Basic Coding
    Replies: 1
    Last Post: 03-17-2009, 01:09 AM
  3. bitmap: adding alpha channel
    By in forum OpenGL: Basic Coding
    Replies: 5
    Last Post: 06-05-2004, 08:37 AM
  4. Adding alpha value to texture
    By Sven2 in forum OpenGL: Advanced Coding
    Replies: 3
    Last Post: 04-28-2002, 02:18 PM
  5. Adding alpha channel to textures
    By rhmazza in forum OpenGL: Advanced Coding
    Replies: 1
    Last Post: 01-14-2001, 05:30 PM

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