I want to draw small sprites directly onto a background image/pixmap.
Right now, the only way I can see to do that is to do the following at each rendering step:
1. draw the background image to the buffer
2. if it is necessary to draw such a sprite to the background:
2a. draw the sprite to the buffer
2b. grab a new pixmap and set the return value to the background image (so that next time I draw the background image, the sprite is automatically incorporated)
3. draw the rest of the scene
I have considered the possibility of blitting the pixels from the sprite directly onto the pixels of the background image, but that seems to be really inefficient and I'd have to write my own transforms.
What should I be doing instead?
Right now, the only way I can see to do that is to do the following at each rendering step:
1. draw the background image to the buffer
2. if it is necessary to draw such a sprite to the background:
2a. draw the sprite to the buffer
2b. grab a new pixmap and set the return value to the background image (so that next time I draw the background image, the sprite is automatically incorporated)
3. draw the rest of the scene
I have considered the possibility of blitting the pixels from the sprite directly onto the pixels of the background image, but that seems to be really inefficient and I'd have to write my own transforms.
What should I be doing instead?