SDL and batch mode

Hello,

I’m looking for a way to launch a SDL/C++ executables in batch mode (no
OpenGL used), that is: without opening any windows for graphical output. I
would have guessed there would be a simple flag when calling
SDL_SetVideoMode but i failed to find it. Did i miss something obvious? Is
there any simple solution to this?

The motivation is to be able to launch my program several times on a
multi-core linux PC with no video output (distant connection, the process is
launched as standalone (nohup) and i usually disconnect and leave the
processes running).

Thanks!

nicolas

ps: I could not find any answer in the mailing list archive or in google -
but maybe i did not use the right keywords…

Hello,

I can’t test this now, but one possiblity would be to set the video
dirver to “dummy”. See
http://www.libsdl.org/cgi/docwiki.cgi/SDL_envvars in particular
SDL_VIDEODRIVER.

Regards,
Brian.On Wed, Jan 7, 2009 at 10:22 AM, Nicolas Bredeche wrote:

I’m looking for a way to launch a SDL/C++ executables in batch mode (no
OpenGL used), that is: without opening any windows for graphical output. I
would have guessed there would be a simple flag when calling
SDL_SetVideoMode but i failed to find it. Did i miss something obvious? Is
there any simple solution to this?

Hello !

I can’t test this now, but one possiblity would be to set the video
dirver to “dummy”. See
http://www.libsdl.org/cgi/docwiki.cgi/SDL_envvars in particular
SDL_VIDEODRIVER.

This works great. I am using this in my GUI applications,
when i need to compose images. Often it is much easier to
use than the GUI toolkit GFX API.

CU

If you don’t mind my asking, why are you using SDL?On Wed, Jan 7, 2009 at 5:22 AM, Nicolas Bredeche wrote:

I’m looking for a way to launch a SDL/C++ executables in batch mode (no
OpenGL used), that is: without opening any windows for graphical output. I
would have guessed there would be a simple flag when calling
SDL_SetVideoMode but i failed to find it. Did i miss something obvious? Is
there any simple solution to this?

The motivation is to be able to launch my program several times on a
multi-core linux PC with no video output (distant connection, the process is
launched as standalone (nohup) and i usually disconnect and leave the
processes running).


http://codebad.com/

People use video-less SDL when they’re comfortable with it so that they can
use it’s event system or audio.

Jonny DOn Wed, Jan 7, 2009 at 1:38 PM, Donny Viszneki <donny.viszneki at gmail.com>wrote:

On Wed, Jan 7, 2009 at 5:22 AM, Nicolas Bredeche wrote:

I’m looking for a way to launch a SDL/C++ executables in batch mode (no
OpenGL used), that is: without opening any windows for graphical output.
I
would have guessed there would be a simple flag when calling
SDL_SetVideoMode but i failed to find it. Did i miss something obvious?
Is
there any simple solution to this?

The motivation is to be able to launch my program several times on a
multi-core linux PC with no video output (distant connection, the process
is
launched as standalone (nohup) and i usually disconnect and leave the
processes running).

If you don’t mind my asking, why are you using SDL?


http://codebad.com/


SDL mailing list
SDL at lists.libsdl.org
http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org

If you don’t mind my asking, why are you using SDL?

I wrote a very simple 2D robot simulator and SDL provides visualization. The
simulator is used in the context of evolutionary robotics (ie. optimizing
neural network control through artificial evolution in the present case),
which is quite intensive regarding computer use.

Uh, by the way i wrote a very simple “game” using SDL based on a tutorial i
found on the internet (“Lazy Foo’s”). If you have time to spare, you can get
it there: http://neuronik.free.fr/nemelith/?p=67

Best,
-nicolas