HowToC:TransTextures

From S2PLOT

Revision as of 05:05, 23 November 2007; view current revision
←Older revision | Newer revision→
Jump to: navigation, search

It's very common to want to read a texture from an existing bitmap image. It's also pretty common to want to modify that texture so that parts of it are transparent. Here's an example bit of code that uses the S2PLOT texture functions to:

  • load an image as a texture,
  • get access to the bitmap of the texture,
  • set the transparency of each pixel proportional to its brightness,
Personal tools