Sign in to follow this  
zny2004

how can i save the texture to a file?

Recommended Posts

I depends on the format you want.
If it is bmp, it's quite easy but, other formats are not, maybe.

So, you can use image format libaries, or you have to implement them.

Share this post


Link to post
Share on other sites
use glGetTexImage to get the image data of a texture. then you can do anything you want with the image data. use your own file format, learn others or use a image format library to save it. i like .raw :)

Share this post


Link to post
Share on other sites
Quote:
Original post by zny2004
i use the glTexSubImage2D() modify the texture,
and i want to save the texture to a file,
how can i do?


You can use glReadPixels .

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