Page flipping problems (fbdev)

HI!
I got two problems. I wrote a program(1024x768) using
SDL_flip() and under X it looks nice but is very slow.
So i tried it with the FB-Device which does all the
thinks very fast but the whole screen flickers. Under
X the objects moves realy nice but under the FB i can
see the “track” of the moving picture. The background
is also one time on and another time off.

How do i configure the fb? Is there a Cyrix MediaGX
accelerated fbdev?

Everytime my program runs the console gets locked and
i
can’t switch between all consoles. After program
termination the screen is also locked and i can’t
switch. The only way to restore the screen is to
reboot the box. (I use threads. Are there any problems
with them?)

I know that X can’t page flipping but all these
problems just began with the fbdev.

Thanks for suggestions !!!__________________________________________________________________
Do You Yahoo!?
Gesendet von Yahoo! Mail - http://mail.yahoo.de
Yahoo! Mail auf Ihrem Handy? - http://mobil.yahoo.de

I got two problems. I wrote a program(1024x768) using
SDL_flip() and under X it looks nice but is very slow.
So i tried it with the FB-Device which does all the
thinks very fast but the whole screen flickers. Under
X the objects moves realy nice but under the FB i can
see the “track” of the moving picture. The background
is also one time on and another time off.

When using double buffering, you need to be aware of what’s going on
in the background:

SDL is using two video surfaces. When you lock the video surface to
get access to the pixels, you are getting access to the surface not
currently visible. When you call SDL_Flip(), the two surfaces are
swapped. Normally this is not a problem for programs redrawing the
entire screen every frame, but if you are doing dirty rectangle work,
you need to be aware that half of your frames are going to one surface,
and half of your frames are going to another surface.

Be sure to check whether or not the returned display surface has the
double buffering flag set. If it does not, you only have access to
a single video surface, and SDL_Flip() is emulated as a fullscreen update.

Everytime my program runs the console gets locked and i
can’t switch between all consoles.

You need to handle events for SDL to handle console switch requests.

After program termination the screen is also locked and i can’t
switch. The only way to restore the screen is to reboot the box.
(I use threads. Are there any problems with them?)

This is a bug. It sounds like your program is crashing on cleanup.
Run gdb on a remote terminal to see what’s going on. Threads shouldn’t
affect it, unless you do not clean up all your threads before you quit.
It’s possible that you are creating a deadlock condition on exit.

Thanks for suggestions !!!

You’re welcome. Good luck!

See ya,
-Sam Lantinga, Lead Programmer, Loki Entertainment Software