I am drawing images composed of many smaller tiles (using 16px by 16px tiles, 16 tiles wide and 11 tiles high)
I already know about the DrawImage() function, that is what I am using. I have the drawing algorithm down; I just want to replace the DrawImage function for the sake of speed. I would prefer to use the API function Bitblt() because it is much faster.
What I have now is an image control which contains my tiles. I blit these to a panel control to draw my image.
What I need to do is create an offscreen bitmap which will act as a "tile source" to which I can load a bitmap containing all of my tiles. I need to blit these tiles to a second offscreen bitmap, where I construct my image. Then I can persist my image to a panel control (or any control).
I have no idea how to create the offscreen bitmaps. I know there are methods that involve the CreateCompatibleDC() API
If you show me how to do this, or gimme a link to a good, not confusing, tutorial I will be happy. I like to be happy.
I already know about the DrawImage() function, that is what I am using. I have the drawing algorithm down; I just want to replace the DrawImage function for the sake of speed. I would prefer to use the API function Bitblt() because it is much faster.
What I have now is an image control which contains my tiles. I blit these to a panel control to draw my image.
What I need to do is create an offscreen bitmap which will act as a "tile source" to which I can load a bitmap containing all of my tiles. I need to blit these tiles to a second offscreen bitmap, where I construct my image. Then I can persist my image to a panel control (or any control).
I have no idea how to create the offscreen bitmaps. I know there are methods that involve the CreateCompatibleDC() API
If you show me how to do this, or gimme a link to a good, not confusing, tutorial I will be happy. I like to be happy.
Last edited by a moderator: