[SDL] faster way?
warren at businesslink.com
Mon Aug 16 17:44:10 PDT 1999
Well, all Linux-promotion aside, there was a fundamental design
decision in X Windows to provide a network-aware GUI. X Windows'
design is network-based, and although there are extensions to provide
direct access to an X server for increased speed, a non-root user
generally doesn't have access to these, for security reasons. The
networking ability of X allows you to remotely run applications, but
performance may suffer for local access to the screen, especially if a
non-root user is running the program.
MacOS and Windows don't care so much about security, so they give
regular users direct access to the video buffer (which could let one
program grab data from another program without it's knowledge or
consent, a no-no for a secure OS).
If you need the speed that DGA gives, for a non-root user, you can
make your program suid root. Just be aware that the onus of security
now falls on your program, so if someone figures out how to break into
your program, they can still cause havoc.
If the program is going to be running on a single-user home machine
(as most games do), security isn't such a great concern. In this
case, you can provide an install program that makes the game
executable suid root (giving appropriate warning to the user). Of
course, the install itself must be run as root, but that's normal for
installing shared binaries. You can have your installer detect if
it's not run as root, and in that case, warn the user that they won't
get the increased performance of DGA unless they manually make the
game binary suid root.
Warren E. Downs
______________________________ Reply Separator _________________________________
Subject: Re: [SDL] faster way?
Author: <sdl at surfnetcity.com.au > at internet-mail
Date: 8/15/99 10:55 PM
seanh21 at mail.execpc.com wrote:
> Many Mac programs run 60fps on 60mhz 601 cpus. Is this an SDL thing? or
> a linux thing? or an X thing? or am I imagining it?
Well, in all fairness you can't compare a native mac app to a emulation. I think
are imagining it. I haven't really had any problem with Linux speed. In fact
II in a window is much faster on Linux than Windows.
> On Sun, 15 Aug 1999, John Garrison wrote:
> > seanh21 at mail.execpc.com wrote:
> > > Why are windowed displays on linux so slow? I have never done any
> > > graphics programming on linux but from my mac background these framerates
> > > seem very low. I am just curious.
> > >
> > The Dgen Sega Genesis emulator has been known to run upwards of 60fps on my
> > computer, so I wouldn't call linux windowed displays slow.
More information about the SDL