Loading textures to the GPU

Started by
3 comments, last by DividedByZero 9 years, 9 months ago

Hi guys!

Not really a problem, just a quick question. smile.png

When you load a texture (for example a JPG) on to the d3dDevice via CreateTextureFromFile() or similar, is the texture decompressed by the API and then sent to the video card, or is the image decompressed on the video card itself?

Thanks in advance biggrin.png

Advertisement

The texture is completely decompressed by the API, unless the file is a special compression format that can be decompressed by the GPU. Those formats are the various DXT or BC formats that are stored inside DDS files. Common compression formats (PNG, JPEG, TGA, etc) are API-decompressed.

SlimDX | Ventspace Blog | Twitter | Diverse teams make better games. I am currently hiring capable C++ engine developers in Baltimore, MD.

Ah ok, got ya :)

Are any of the GPU formats reasonable quality or even lossless?

They're all lossy. They are commonly used and of reasonable quality depending on your scenario. They offer not just a win in terms of memory usage, but also potentially performance (it's less data for the GPU to read into the texture cache).

http://en.wikipedia.org/wiki/S3_Texture_Compression

http://www.reedbeta.com/blog/2012/02/12/understanding-bcn-texture-compression-formats/

Awesome. Thanks for the info guys smile.png

This topic is closed to new replies.

Advertisement