PDA

View Full Version : Easy library to load FS texture?


arno
21 Jul 2008, 04:44
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 :).

lmoelleb
21 Jul 2008, 04:55
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. :(

scruffyduck
21 Jul 2008, 06:20
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.

decapod
21 Jul 2008, 12:07
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

arno
21 Jul 2008, 14:25
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

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.