Advertisement Jump to content
Sign in to follow this  

DX11 Storing textures (game engine)

This topic is 1759 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

Just a short question... I need to store and compress all my textures inside a single file...


Its better to save them as .dds, compress using zlib (for example) and load using directX "D3DX11CreateShaderResourceViewFromFile" after decompressing or should I store them as raw pixel data (RGBA channels), compress using zlib (again, zlib or any other) and load creating an empty texture, updating the buffer and then generate the mip maps?


Just some notes:


- Yes I need mip maps always.

- I use the 4 channels (RGBA) almost always.

- Currently I'm using DirectX11 and C++.


Thanks :)

Share this post

Link to post
Share on other sites

You should use DDS format. After that, there is no limitation how you'll store the files on the disk ie. singular files or maybe some kind of a file system with single file.


I'm using DirectXTK and DirectX::CreateDDSTextureFromMemoryEx function to create textures from a memory buffer. This allows me to store data on disk however I want and unpack it to memory from where I can create the texture object.



Share this post

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

  • Advertisement

Important Information

By using, you agree to our community Guidelines, Terms of Use, and Privacy Policy. 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!