Jump to content
  • Advertisement
Sign in to follow this  
slowmike

.bmp tile storage N' speed

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

Is there any difference (mainly affecting speed) between the way a program uses a .bmp file that is more square shaped (640x640 for example), and the way it uses a .bmp file that is very long (1280x64 for example)? I will normally use rows and columns in a tile.bmp, but when I'm not using tiles and I just load in a long image for something, it seems to cut my frame rate by 1/3. Any thoughts? Thank You. P.S. I'm using C++ / DirectX / .NET2003

Share this post


Link to post
Share on other sites
Advertisement
One reason it might be slow is that your image is not a power-of-two. Up until recently, video cards only liked images that were power-of-two in each dimension.

Also, many older cards have maximum dimensions of 1024 in either direction, although newer cards have limits of 2048 or more. 1024 is still the highest you should go in practice.

It sounds like either 512x512 or 1024x64 would work well. Maybe make it two rows and use 1024x128.

Another cause to look at is your implementation details. Not even experienced people write perfect code the first time through. There's no way to tell what those improvements are without looking at your code.

Share this post


Link to post
Share on other sites
Guest Anonymous Poster
Something which may be of interest, when using surfaces with directx I tried loading a non square surface, (or non power of 2), I wasn't able to render it to the screen, so I checked the info for the file (d3d function to get image info), it actually took up the same amount of room as if it was square. - So basicly your 1280x64 bitmap might be taking up 1280x1280 in memory.

Share this post


Link to post
Share on other sites
IIRC DirectX textures have a maximum ratio of width to height (or height to width) which they have to be under. Going over this may mean some under the hood slicing into multiple textures or some such oddness. I can't remember the exact attribute though, check the device caps for it.

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.

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!