Image file types

Started by
12 comments, last by AAAP 18 years, 2 months ago
while converting the image to a format you can upload to video thru opengl, make the pixels with the "key color" 0 0 0 0, so its transparent pixel in openGL. there might be other ways, as well. a good idea is to just use a format that natively has alpha channel
|aaap.penopticon.com| My website, including game projects. Collaboration/comments are welcome, please visit :)
Advertisement
Why not use the JPEG ?

To download the INTEL JPEG LIBRARY ....
Quote:Original post by EvilKnuckles666
i just have one question about glGenTextures()...
what's the first parameter for? at first i thought it was to specific the texture number; like if i put 1, then make another texture with 1, it would over write that... what's it for?

It denotes the number of texture objects generated by opengl, which are stored in an array, the pointer to the first element of which you provide in the second parameter.

/edit: Forgot the most important thing [smile] ... so in other words, you can use 1 as many times as you want.

And about the image loading thing, I have used SDL_image, and it's good but since it has to support a large number of file formats, I found it a little bloated (with 3 or 4 dll's having to accompany the executable). You will realistically) only need support for 1 or maybe 2 formats, and you're perhaps better off writing the loader to that yourself. TGA is a format that supports an alpha channel, the compression algorithm is extrememly simple and is on the whole very easy to parse,

Go to wotsit.org for file specs.
you could compile its dependencies as static libs and link with the static libs, fyi <_<
|aaap.penopticon.com| My website, including game projects. Collaboration/comments are welcome, please visit :)

This topic is closed to new replies.

Advertisement