Jump to content

  • Log In with Google      Sign In   
  • Create Account

We're offering banner ads on our site from just $5!

1. Details HERE. 2. GDNet+ Subscriptions HERE. 3. Ad upload HERE.


Storing textures (game engine)


Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.

  • You cannot reply to this topic
2 replies to this topic

#1 Flicklizic   Members   -  Reputation: 541

Like
0Likes
Like

Posted 24 March 2014 - 03:43 PM

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 :)



Sponsor:

#2 kauna   Crossbones+   -  Reputation: 2748

Like
3Likes
Like

Posted 24 March 2014 - 07:57 PM

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.

 

Cheers!



#3 Flicklizic   Members   -  Reputation: 541

Like
0Likes
Like

Posted 25 March 2014 - 03:31 PM

I will probably structure my engine that way, thanks for the reply!






Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.



PARTNERS