</vacation>

There is no point in using S3TC compression for images stored on the
disk. Adding detection for and use of hardware/driver support for S3TC
compression of textures is a few lines of code, like this (from
another project of mine):

 /* Find general OpenGL extensions */
 glext = (char *)glGetString(GL_EXTENSIONS);

 /* Find texture compression extension */
 if (strstr(glext, "GL_ARB_texture_compression") != NULL) {
   if (strstr(glext, "GL_EXT_texture_compression_s3tc") == NULL) {
     freelog(LOG_FGL, "Texture compression: Yes, but no s3tc");
     fgl_internalformat = GL_COMPRESSED_RGBA_ARB;
   } else {
     freelog(LOG_FGL, "Texture compression: Yes (including s3tc)");
     fgl_internalformat = GL_COMPRESSED_RGBA_S3TC_DXT1_EXT;
   }
 } else {
   freelog(LOG_FGL, "Texture compression: No");
   fgl_internalformat = GL_RGBA;
 }
....
 glTexImage2D(fgl_texture, 0, fgl_internalformat, w, h, 0, GL_RGBA,
                GL_UNSIGNED_BYTE, gfx->pixels);

This compresses textures in the video RAM, if possible. (The strstrs
above are a bit ugly, and should have been improved.) This is somewhat
pointless, though, since we do not really use much video RAM at the
moment.

I do not know anything about the DirectX formats, but I fail to see
anything lacking with  PNG. We create mipmaps on the fly already, and
there is no need to waste disk space on storing them to the disk.
Besides, image compression has heaps of patents.

I agree with Christian: "Use tabs to indent and spaces to align".

Good point about the WAV data. I think we should perhaps put the WAV
files back in the repository again, under a different directory than
trunk (a /raw_data directory, perhaps). Working on lossily compressed
data would be stupid. Not that it is likely that anyone is going to,
though.

<vacation>

- Per

_______________________________________________
Warzone-dev mailing list
[email protected]
https://mail.gna.org/listinfo/warzone-dev

Reply via email to