I'm trying to make my loading a bit faster (right now engine loads TGA files, compress them and creates mipmaps and it takes too long) So my idea is to save already compressed textures and next time just copy-paste it to memory without compressing it another time. But there is a problem - I don't know how to save compressed textures to a file. I have to save data in format that is very easy for opengl to load. Same situation with mipmaps.
问问题
948 次
1 回答
2
You can retrieve the compressed texture image data using glGetCompressedTexImage. You'll also likely need to retrieve the image format (details are at the bottom of the glGetCompressedTexImage man page). As for storing the image data, use any file format that matches your need (including just a simple binary file).
于 2013-01-12T23:29:21.733 回答