Scrolling background?

Hello everyone !!!

I was wondering if there was a standard way of creating
a scrolling background ,… I mean ,… I’ve heard of bliting
the hardware memory to the hardware memory with a little offset
and then filling the “blank” area with the new background piece …
it looks nice, and hardware-to-hardware blit is fast ,(I think ),…
but I still have some quetions … :
1- How do I access hardware memory ?, is setting SDL_HWSURFACE enough ?
if I use SDL_HWSURFACE, can I combine it with SDL_DOUBLEBUF and still
have access to hardware-memory(directly ,I mean).

2- Is this means that I can’t count on a sollution based on SDL_SWSURFACE ?
because if I use SDL_SWSURFACE, and I offset the background, I need to
redraw
a huge area of the screen in sofware memory and then update it,which is
quite
expensive in terms of CPU power …
But if I can’t use SDL_SWSURFACE, I’ll oblige the user of my games to
have
(correctly-configured) hardware acceleration, even if I’m going only to
do 2D stuffs !!
and that’s not good …

Thanks in advence.****
“Stand for something, or you will fall for nothing” – Richard M.
Stallman.
Then ,we’ll stand for the free-software !!!..


Hi!
I’ve tried to get any question on this subject but it’s very hard to
do… So, I use same algorythm that you wrote. I pass SDL_HWSURFACE |
SDL_DOUBLEBUFFER at first. But is you have real hardware acceleration
under X Window you need set up evironment variable SDL_VIDEODRIVER =
dga. If you a win32 coder, you need launch your program in fuulscreen
mode with DirectX support (you must build SDL with DX support)

Best regards,
Evgeny Bronnikov