Part of the Khronos Group
OpenGL.org

The Industry's Foundation for High Performance Graphics

from games to virtual reality, mobile phones to supercomputers

Page 1 of 3 123 LastLast
Results 1 to 10 of 28

Thread: manual ARB_texture_compression comp/decomp

  1. #1
    Member Regular Contributor remdul's Avatar
    Join Date
    Mar 2004
    Location
    The Netherlands
    Posts
    335

    manual ARB_texture_compression comp/decomp

    Is there code available for offline compression/decompresion to/from the GL_ARB_texture_compression format?

    I'm interested in distributing textures with my software in compressed format (glGetCompressedTexImageARB), but if I do so I need to decompress them manually for machines on which the extension is not available.
    I know this isn't really smart, but want to try anyway (for-fun).

    If there isn't any code publicly available, could someone provide me details on the compression scheme so I can reverse engineer it? I'll share my code if I succeed.

  2. #2
    Junior Member Newbie
    Join Date
    Nov 2006
    Posts
    12

    Re: manual ARB_texture_compression comp/decomp

    If I'm understanding you correctly, I think you're heading down the wrong track. The actual compression method used is dependant on the individual machines drivers/hardware. If you compress textures on your machine with the algorithm implemented in your driver, you may not be able to decompress it on another machine.

  3. #3
    Member Regular Contributor remdul's Avatar
    Join Date
    Mar 2004
    Location
    The Netherlands
    Posts
    335

    Re: manual ARB_texture_compression comp/decomp

    I thought it did too, but someone here said that it should work*.

    I too have my doubts, the spec isn't that clear and suggests there is room for the vendors to play with, just not sure to what degree.

    * Edit: I was referring to this thread:
    http://www.opengl.org/discussion_boa...=015012#000023
    Tamlin, if you read this, I'm interested in hearing your long answer.

  4. #4
    Junior Member Newbie
    Join Date
    Oct 2006
    Location
    Sweden
    Posts
    23

    Re: manual ARB_texture_compression comp/decomp

    Texture compression is standardized and games have been distributed with precompressed textures for years. In D3D you simply use the textool to create compressed .dds files, and then everything is taken care of for you. As for OpenGL, I have never used compressed textures with it, so... you'll have to wait for a better answer

  5. #5
    Member Regular Contributor remdul's Avatar
    Join Date
    Mar 2004
    Location
    The Netherlands
    Posts
    335

    Re: manual ARB_texture_compression comp/decomp

    Yes, that's what I was hoping to achieve, something along the lines of the DDS format with a simple tool to do the conversion.

  6. #6
    Senior Member OpenGL Guru
    Join Date
    Dec 2000
    Location
    Reutlingen, Germany
    Posts
    2,052

    Re: manual ARB_texture_compression comp/decomp

    If you have Photoshop, you can use nVidias tools to compress your textures and store them in DDS-format.

    To decompress your textures manually, you might want to take a look at nVidias code, AFAIK there is open-source stuff, though i am not sure. Other than that, there are some other libraries, too. I think DevIL (formerly known as OpenIL), allows you to load DDS files. DevIL is open source, so you might find what you are looking for, in there.

    All current games distribute there textures in compressed form. Today most use the DDS format, because it also decreases load-times. Also precompressing the textures can yield better quality, than using the built in compressors of the GPU.

    Jan.
    GLIM - Immediate Mode Emulation for GL3

  7. #7
    Member Regular Contributor remdul's Avatar
    Join Date
    Mar 2004
    Location
    The Netherlands
    Posts
    335

    Re: manual ARB_texture_compression comp/decomp

    I'm aware of that, but I'm trying to do that with ARB_texture_compression instead of DDS compressed textures.

    Can someone please confirm whether or not ARB_tex_compression compressed textures are cross-compatible between vendors/drivers?

    (I have checked out Mesa3d in the mean while, and it apears this extension is not implemented, no hints there either.)

  8. #8
    Junior Member Regular Contributor
    Join Date
    Sep 2000
    Location
    France
    Posts
    193

    Re: manual ARB_texture_compression comp/decomp

    Actually, the ARB_texture_compression extension provides an API to handle compressed textures but does not define/specify any compression format.

    The most used compression formats are in the DXTC family (also known as S3TC). The compression formats are exposed by additional extensions, see for example the 'EXT_texture_compression_s3tc' extension.

    DXTC/S3TC is supported by all NVidia/ATI cards at least since GeForce 1 I think. I'm not familiar with other platforms but it really is the most used compression format nowadays.

    For offline (de)compression, you can use the OpenGL driver or alternate libraries such as
    Simon Brown\'s squish or intel/id code

    For more information on DXTC formats, you can have a look here .

    HTH, cheers

  9. #9
    Junior Member Regular Contributor
    Join Date
    Feb 2003
    Location
    Waltham, MA
    Posts
    126

    Re: manual ARB_texture_compression comp/decomp

    Also, just to eliminate any confusion, S3TC and DXT formats are the same thing. Why/how the name changed to DXTC, I'm not sure. Perhaps because S3 is a company name?

    Kevin B

  10. #10
    Senior Member OpenGL Pro Zengar's Avatar
    Join Date
    Sep 2001
    Location
    Germany
    Posts
    1,979

    Re: manual ARB_texture_compression comp/decomp

    DXTC stands for DirectX Texture Compression

    I would recommend the latest Nvidia DXT library, it is open-source now, offering some very good quality and performance

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •