1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Easy library to load FS texture?

Discussion in 'Tools programming' started by arno, 21/7/08.

  1. arno

    arno Administrator Staff Member FSDevConf team Resource contributor

    Joined:
    28/5/04
    Messages:
    21,304
    Country:
    netherlands
    Hi,

    Does anybody know an easy library that can be used to load the different texture types used by FS (BMP, DXT BMP, DDS, etc) into a tool? Preferably easy to use in C#.

    At the moment I am using the library behind the XnView thumbnail viewer, but with that one I can not read the alpha channel correctly. I am wondering if other people are using other libraries with more success :).
  2. lmoelleb

    lmoelleb

    Joined:
    23/4/05
    Messages:
    266
    I did look some months back without finding anything. At the time I just needed to determine if a texture had alpha channel or not, so I ended up writing the DXT decoding. From what I could see creating a native C# library able to add/remove mipmaps, change format etc would be rather trivial (but unfortunately also a bit time consuming, and time is something I do not have available. :(
  3. scruffyduck

    scruffyduck Administrator Staff Member FSDevConf team Resource contributor

    Joined:
    17/9/05
    Messages:
    25,788
    Country:
    wales
    I've used Martin Wright's Library but not recently so I am not sure if it can handle everything. Written in C or C++ so needs pinvoke to get at it. I don't think there is a managed wrapper.
    Last edited: 21/7/08
  4. decapod

    decapod

    Joined:
    2/4/07
    Messages:
    132
    Country:
    england
    MS produced a managed version of the DX9 api a while ago which could load DDS files directly, they then dropped it for DX10 causing a lot of headaches - C++ only now.

    However there was a community effort to get managed DX10 http://www.mdxinfo.com/
    I've not looked at it recently
    - take a look at the slimDx library
    Last edited: 21/7/08
  5. arno

    arno Administrator Staff Member FSDevConf team Resource contributor

    Joined:
    28/5/04
    Messages:
    21,304
    Country:
    netherlands
    Sounds interesting, I'll take a look. Hopefully it can read some of the older BMP DXT files as well, as they seem to give the most trouble. Else I will try to wrap Martin Wright DLLs.

Share This Page