Sign in to follow this  
rosicky2005

Problem on bitmap export using texture

Recommended Posts

For the following coding: AUX_RGBImageRec *Bitmap = NULL; Bit = auxDIBImageLoad("Data/try.bmp"); I have a Bitmap containing try.bmp now. So, now I want to put the data in "Bit" into a texture and then export the data into another AUX_RGBImageRec object called Bitmap2. Finally, data in Bitmap2 is written in another Bitmap files, say try2.bmp. What procedures should I do then? Also, how can I read and write other picture formats(e.g. jpeg) in Open GL? [Edited by - rosicky2005 on October 4, 2006 2:01:20 AM]

Share this post


Link to post
Share on other sites
You're using glaux. Do not use glaux. glaux is evil.

No seriously, the aux library is completely obsolete, and is one bug ridden piece of software full of instabilities, undefined behaviour, and memory leaks. It's not officially maintained anymore, so the bugs will never be fixed. The fact that this NeHe stuff still propagates its use doesn't really help either. You definitely should keep away from it.

That said, you can either write your own image loading functions (tedious and error prone), use specialised proven libraries such as libjpeg or libpng (flexible and powerful), or use some existing combined image loading library (simple and quick to implement).

Although I don't particularily like it, you can try DevIL. It seems to be quite popular here on the boards.

Share this post


Link to post
Share on other sites
Quote:
Original post by Yann L
You're using glaux. Do not use glaux. glaux is evil.

No seriously, the aux library is completely obsolete, and is one bug ridden piece of software full of instabilities, undefined behaviour, and memory leaks. It's not officially maintained anymore, so the bugs will never be fixed. The fact that this NeHe stuff still propagates its use doesn't really help either. You definitely should keep away from it.

That said, you can either write your own image loading functions (tedious and error prone), use specialised proven libraries such as libjpeg or libpng (flexible and powerful), or use some existing combined image loading library (simple and quick to implement).

Although I don't particularily like it, you can try DevIL. It seems to be quite popular here on the boards.


Then how can I find libjpeg/libpng?

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this