Jump to content


DirectX 9 Texture Image Format


3 replies to this topic

#1 eugene

    New Member

  • Members
  • Pip
  • 5 posts
  • LocationAbu Dhabi

Posted 05 February 2012 - 09:23 AM

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,
eugene

Senior Software Developer
MSc Astrophysics

spaceportz@gmail.com

#2 rouncer

    Senior Member

  • Members
  • PipPipPipPip
  • 2334 posts

Posted 06 February 2012 - 07:07 AM

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.
you used to be able to fit a game on a disk, then you used to be able to fit a game on a cd, then you used to be able to fit a game on a dvd, now you can barely fit one on your harddrive.

#3 hellhound_01

    New Member

  • Members
  • PipPip
  • 42 posts

Posted 06 February 2012 - 08:52 AM

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...
"There is only one god and his name is death. And there is only one thing we have to say to Death: Not today!" -- Syrio Forel (from Game of Thrones)

#4 marek-knows.com

    Valued Member

  • Members
  • PipPipPip
  • 189 posts
  • LocationOntario, Canada

Posted 06 February 2012 - 10:29 AM

If you want to see how to load png files have a look at this video tutorial that I created:
http://www.marek-kno...hp5?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-kno...5?vmk=opengl2p1
3D OpenGL, C++ Game Development Video Tutorials @
www.marek-knows.com





1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users