Jump to content
  • Advertisement


This topic is now archived and is closed to further replies.

Dov Sherman

Textures, Palettes, and Memory Usage

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

I''m developing a program which uses both fullcolor ARGB textures and paletted ARGB textures and I want to optimize my code to use as little memory as possible. First question: I know that video cards prefer textures to be in sizes which are powers of 2. Are there particular powers of 2 which are especially memory efficient? Second question: I''ve been using GetAvailableTextureMem() to get a rough tracking of memory use and I noticed that, after I load a number of paletted textures, the memory reported goes down once when I finish loading them and then it goes down again later when I actually render those textures. Once I''ve rendered all the textures at least once, the memory usage reported stops changing. How does the video card handle paletted textures? Does it make a palette-indexed texture in one place and then make a duplicate fullcolor texture when I set the palette? If so, is the duplicate texture memory pre-allocated or does it wait to allocate it until I actually try to use that texture?

Share this post

Link to post
Share on other sites

  • Advertisement

Important Information

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

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!