Bitmaps and textures

ondesic

Active Member
Licensed User
Longtime User
I have written a few heavy graphics programs. I know that during the rendering cycle, if you switch textures you take a performance hit. Therefore I would try to have all graphics confined to a texture sheet, then take portions of the large texture to make my sprites.

My question is: If I had all my graphics on one sheet and loaded it to a bitmap, then used LoadBitmapSample, would this speed up my program?
 

thedesolatesoul

Expert
Licensed User
Longtime User
I would say yes it should speed up the program since there will be less disk access.
However, you will need more memory to load up the bitmap (which will put a lower limit on the memory a device needs to run your program).

But this is just from a naive persons perspective. Someone with more insight can answer better.
 
Upvote 0

ondesic

Active Member
Licensed User
Longtime User
My idea didn't work as LoadBitmapSample is different than I thought.

How can I load a large image with all my graphics in it, then assign portions of that bitmap to make my buttons?

Thanks
 
Upvote 0
Cookies are required to use this site. You must accept them to continue using the site. Learn more…