Jump to content
  • Advertisement
Sign in to follow this  
BloodLust666

ilBlit

This topic is 4500 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've come to realize that this function is EXTREMELY SLOW.... I have a map that is 22 tiles by 200 tiles at 32x32 each, and i ilBlit it all to one texture and it takes about 5 minutes... and i'm using a pretty high end computer too... any suggestions? one i think i might do is go back to my first idea (from a LONG time ago) and just render each tile one at a time instead of putting it all into one texture and rendering that one.

Share this post


Link to post
Share on other sites
Advertisement
With an 8 bit palletized texture that would be over 4 meg in size, 9 in 16 bit, 12 and 16 in 24/32 bit respectively. Blitting anything of that magnitude is going to take some time regardless of the API you use.

As Rob Loach mentioned in his post a while back to a similar question you posed here you will want to only do this to a texture once and then use OpenGL to render textured quads to the screen. Unfortunately in this case I think you are doing more work than is necessary and the road you are on won't work out in the end.

As a suggestion I would recommend putting similar tiles onto smaller tile-sheets and using texture coordinates to cut them out on the fly kind of like source rectangles in SDL and draw only the parts of your map you want to use.

I apologize if I have read your post incorrectly but I really think you should re-think what you are doing and figure out a different approach.

Share this post


Link to post
Share on other sites
wow, that's a good idea. i think i'll do that then, it would save time and memory by drawing only the tiles that the screen would be viewing. thanks

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!