Sign in to follow this  

texture memory usage ?

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

gasp, I just realized that when I make into textures 24 bits bitmap files, they use roughly twice the expected memory. Specifically a 2.25 mb file (a 1024x768 screen @ 24 bits) will use 5.5 megs once made into texture. I can understand a part of it, I ask the texture to handle an alpha channel, so 4 bytes for each texel, but why this double amount? I use this call: D3DXCreateTextureFromFileInMemoryEx with these flags: D3DFMT_UNKNOWN, D3DPOOL_MANAGED, D3DX_FILTER_NONE, D3DX_FILTER_NONE Any idea? Normal, abnormal?

Share this post


Link to post
Share on other sites
not making mipmaps.

I just calculated the memory usage by checking before and after the texturing of the file (with 2 stop points in my code). Also, as a whole, if I had say 100 mb of bitmap, my system memory will shrink by roughly 250 mb.

Share this post


Link to post
Share on other sites
another related question. If I create some textures with a 32 bits depth, and some others with only 16, will it be handled correctly by DirectX then the video card (the aim is to have some 16 bits textures to reduce memory usage)

Share this post


Link to post
Share on other sites
Yes, all formats can be mixed willy-nilly. You can take an A8R8G8B8 texture, modulate by an L8 texture, then add on an R5G6B5 texture, and store the result in an X1R5G5B5 framebuffer and expect it to work just fine, assuming the hardware you're running on supports all those formats.

Share this post


Link to post
Share on other sites

This topic is 4745 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.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this