Hi guys, I was wondering if anyone knows how expensive exactly is blitting a
surface onto another? I imagine it would be essentially copying pixel arrays
from one surface to another, which would make it roughly O(N) where N is the
number of pixels, but I dont know the constant factors and general real world
Reason I ask is, I am in am doing an app where several images have to be
combined together, rotated, then finally placed onto the screen. I have sprite
sheets of the items I have to splice, and will be using OpenGL to rotate the
final image. So I’m wondering if its cheaper to load all of them into OpenGL as
textures (each sprite, not the sheet entirely) or use SDL to pick pieces of the
sheet out, blit them together, and then pass the blitted surface onto OpenGL as
a texture (which means I’d have to create one every frame since the image is
constantly changing) and only then rotate it.
It seems the latter would be awfully slow because of the blitting and texture
creation. But the sprite sheets are large, thus shoving them into memory in and
out is a hassle.
What do you guys think? Any input is appreciated, thanks in advance!