texture Key Color
is there a way to set a keycolor for a texture to have a transparency without using the alpha?
You could do it manually when you load the texture file. But I think the easiest way is with the alpha channel of the file. I use the TGA file format and automatically my renderer uses the alpha channel that my TGA loader grabs from the TGA file, then it is rendered that way. It only takes a couple of lines, even without my classes.
OpenGL doesn't provide you any funtions to load image, you'll need to write your own or use existing libraries. In case you want to do it yourself, take a look at Wotsit for lists of files format. Image libraries are also freely available (PaintLib for example), however in most cases the provided libraries are overwhelming - writing your own is somewhat simpler.
Which way do you prefer ?.
You may want to take a look at NeHe for OpenGL tutorials.
Which way do you prefer ?.
You may want to take a look at NeHe for OpenGL tutorials.
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement