Im writing a 2d openGL engine… I need some tutorials on loading bmps… loading bmps so that the black pixels are transparent, plotting sprites loaded from bmps
All that kinda stuff!
Im writing a 2d openGL engine… I need some tutorials on loading bmps… loading bmps so that the black pixels are transparent, plotting sprites loaded from bmps
All that kinda stuff!
One thing is you will want to use another graphic file format, under Opengl the Alpha channel is used to map the transparent area on a bitmap. BMP does not support this, but TGA’s do. On the nehe site you will find examples of this in his later lessons.
To map a transparent area by color limits you, best to use a transparency map. This way you can use any colors you want on your sprite and only the colors maped to come through will. One example would be a sprite that cast a shadow down on the ground, you can adjust the transparency to have the shadow only dim the area of the shadow being cast.
Originally posted by Nial:
[b]Im writing a 2d openGL engine… I need some tutorials on loading bmps… loading bmps so that the black pixels are transparent, plotting sprites loaded from bmps
All that kinda stuff![/b]
[This message has been edited by nexusone (edited 03-25-2002).]