Compressed Textures - any out there?

Greetings,

Is there a tool out there that compresses textures in one of the paletted OES formats? i.e. GL_PALETTE4_RGBA4_OES

Or, fail that, a collection of textures in those formats?

  • Ben

I actually asked the question in another forum, and the answer is yes.

  • HM

Thanks Hans - you’re an invaluable member of this board.

  • Ben

Quick amendment - I take it then that you had not finished implementing support for these textures before passing the conformance tests with Vincent.

Does this mean that the OES formats need not be supported, but handled gracefully, or something along those lines?

  • Ben

Compressed textures are supported. However, at this point they are expanded into the closest base internal format that is actually supported by the rasterizer core (instead of having the rasterizer itself use the palette during the actual lookup of texels).

Having the rasterizer resolve palettes should speed up things remarkably.

  • HM

PS: Thanks!

I understand - but I meant that, even if you were converting these textures to whatever internal format, there’s something like 10+ different paletted types defined in OES that you must have tested? Or did you just assume that all was well and kosher with your converting algorithm? :wink:

  • Ben

All formats defined are tested…

  • HM

<BLOCKQUOTE><font size=“1” face=“Arial, Verdana, Helvetica, sans-serif”>quote:</font><HR>Is there a tool out there that compresses textures in one of the paletted OES formats?<HR></BLOCKQUOTE>

In addition to Hans’ link, I should point out that photoshop does an astonishingly good job of palettising images. A while ago I wrote a hextree-based palettiser, and was very pleased with myself until I compared my output to photoshops - there was no comparison whatsoever.

The disadvantages are (1) photoshop’s expensive, (2) you can’t control it from the commandline so it may not fit into your art pipeline very well, and (3) I’m not sure if it handles alpha-channels.

I guess I’m confused - does glCompressedTextures “take” a compressed texture, in the format designated, or does it create one?

I guess the internalFormat paramater confuses me most. It suggests to me that this is the desired internal format of the texture, not the incoming format referenced by the data pointer.

Thoughts?

  • Ben

<BLOCKQUOTE><font size=“1” face=“Arial, Verdana, Helvetica, sans-serif”>quote:</font><HR>Originally posted by bentlegen:
I guess I’m confused - does glCompressedTextures “take” a compressed texture, in the format designated, or does it create one?<HR></BLOCKQUOTE>

glCompressedTexImage*D always takes pre-compressed texture data - it’s up to you to compress it. The ‘internalformat’ parameter specifies the format of the texture-data you’re passing into the function; it certainly does look a bit mis-named.

Normally, the way to get OpenGL to do the compression for you is to use glTexImageD, specifying a compressed internalformat. You can then read the compressed texture back out, which will be suitable for use with glCompressedTexImageD.

However, you can’t do this for paletted textures so that’s useless to you. Sorry.

This topic was automatically closed 183 days after the last reply. New replies are no longer allowed.