[SDL] accessing on video surface from two processes.
Thomas Mueller
t.mueller at ucl.ac.uk
Wed Jun 28 03:43:41 PDT 2006
Dear Alex,
Thanks for dealing with my problem.
I did a bit of "RTFM" and found out that with octave you can dynamically
link external functions. That means I could write a function which opens
a window, declaring the "SDL_Surface *screen;" as a global variable.
A second function can now access the previously opened window, because
it's all one process and "*screen" is global.
It seems all easy now and I don't need to have a server, pipes and
sockets, which I would not have know how to deal with.
Thanks for your kindness.
Yours Thomas.
On Mon, 2006-06-19 at 17:23 -0400, Alex Volkov wrote:
> Thomas Mueller wrote:
> > My problem:
> > I would like to use SDL commands from a scripted environment.
> > Precisely I want to use "octave" (http://www.gnu.org/software/octave/)
> > to produce some SDL graphics.
>
> > Thomas Mueller wrote:
> > > I would like to access a video surface from a second process.
>
> Yeah, if you want to do it this way, you should definitely create an
> SDL-window owner process that will act as a graphics server for your
> octave(?) clients. Just come up with a minimal gfx interface that you need
> (i.e. Point, Line, Rect, Ellipse, Text primitives) and send these commands
> from clients to your server over pipes or sockets, for example.
> Since octave uses gnuplot to do the drawing, I suppose you could hack
> gnuplot to do some of the work for you, or perhaps write a printer driver
> that will forward the rendering commands to your SDL-window server. This
> will be, however, already outside the SDL mailing list topics.
>
> -Alex.
>
>
>
> _______________________________________________
> SDL mailing list
> SDL at libsdl.org
> http://www.libsdl.org/mailman/listinfo/sdl
>
--
Thomas Mueller
Laboratory of Neurobiology @ UCL
phone: +44 (020) 7679 3905
email: t.mueller at ucl.ac.uk
WWW : www.vislab.ucl.ac.uk
More information about the SDL
mailing list