Results 1 to 3 of 3

Thread: Colorkeying!

  1. #1

    Colorkeying!

    Is there a way to use colorkeying in opengl? For example, I have an image that is loaded with DevIL (i know its data), and I want the black color to be transparent. How do i do that??

  2. #2
    Senior Member OpenGL Guru
    Join Date
    Feb 2000
    Location
    Sweden
    Posts
    2,978

    Re: Colorkeying!

    First allocate a new image with room for all color components in the original image plus an alpha channel. Copy each pixel from the old image to the new, and set the alpha channel to either one or zero, depending on the color. If black, set it to zero. Then use alpha test to reject pxiels with alpha other than one, that is, black pixels.

  3. #3

    Re: Colorkeying!

    Thanks a lot!

Similar Threads

  1. OpenGL's version of Colorkeying textures
    By ribblem in forum OpenGL: Advanced Coding
    Replies: 0
    Last Post: 04-17-2000, 10:09 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