Jump to content
  • Advertisement
Sign in to follow this  
DividedByZero

Loading textures to the GPU

This topic is 1620 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

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

Share this post


Link to post
Share on other sites
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.

Share this post


Link to post
Share on other sites

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/

Edited by phil_t

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!