DirectX 9 Texture Image Format

9d9815f3421448af491d8cd571c68419
0
eugene 101 Feb 05, 2012 at 09:23

Hello friends,

Does anybody knows what is the best image format to use for textures in DirectX 9 ?
I have read somewhere that DDS format is Microsoft format for DirectX so I guess this is most optimized format to use ?

Thanks and regards,

3 Replies

Please log in or register to post a reply.

Fd80f81596aa1cf809ceb1c2077e190b
0
rouncer 104 Feb 06, 2012 at 07:07

DDS is mostly unsupported by the world except direct x tools, and there arent many of them and they are really
quickly written, so i dont recommend it, i recommend using more already worldly known formats, that actually are supported by art programs etc.

use pngs, they are losslessly compressed and can contain an alpha channel.

if you want even more compression jpg is the way to go, megatexture uses lossy jpg compression.

but it doesnt matter what you use, what video memory format you load them in as can be compressed too, but its lossy
so its best to have things in vram lossless and raw data.

6532e3e5e09db6f966770fdf86c03345
0
hellhound_01 104 Feb 06, 2012 at 08:52

As Rouncer said, there is no specific format you should use. It depends to your tasks.You should look for library like Freeimage or Devil which could handle most common formats…

500367065665a05a847242a39a0bc69e
0
mmakrzem 101 Feb 06, 2012 at 10:29

If you want to see how to load png files have a look at this video tutorial that I created:

http://www.marek-knows.com/downloads.php5?vmk=cpp24p1

Here is a video tutorial that shows how to integrate the png loader into OpenGL. You should be able to do the same sort of thing using DirectX.

http://www.marek-knows.com/downloads.php5?vmk=opengl2p1