i was wondering can you import gif file formats into opengl instead of bitmaps as you could use the transparency of the gifs
first of all, gifs cant be used without buying a license
2nd, it doesnt work that way
2nd, it doesnt work that way

You can import anything into OpenGL as long as you write a loader for it. However if you load a gif and you'd want to use the transparancy of it, you'd have to load an alpha value of 0.0 into pixels which are tranaparent and 1.0 into ones that aren't. Then use alpha testing so the 0.0 alpha pixels don't get displayed. There's a tut on alpha testing on NeHe. As for loading the gif file learn about File I/O (if you haven't already) then go find the file format specification Wotsit may have it.
[edit]And as the above poster has said there's legal issues with GIFs. So if you planning to distribute your program it's best to avoid them[/edit]
[edited by - Monder on January 10, 2004 1:54:01 PM]
[edit]And as the above poster has said there's legal issues with GIFs. So if you planning to distribute your program it's best to avoid them[/edit]
[edited by - Monder on January 10, 2004 1:54:01 PM]
The patent has been expired in most countries (including the US) for quite some time now. And I think nehe''s ipicture code loads GIF''s with transparency.

-~-The Cow of Darkness-~-
You might want to look into png images. They have transparency, but unlike gifs, there is an actual alpha channel (ie it's not just transparent or opaque, it can be 33% opaque or whatever). It also allows you to use more colors (gif only allows 256). Read this summary of the differences if you are interested.
[edited by - Mr Grinch on January 10, 2004 3:02:09 PM]
[edited by - Mr Grinch on January 10, 2004 3:02:09 PM]
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement
Recommended Tutorials
Advertisement