How to have sevral SDL windows in ONE X11/QT apps

Hi,

I am making a QT application on Linux that displays frames from a camera.
There can be several display windows because i do some image
transformations and i display at the same time the images before and
after the transformation.

I am now switching to SDL to speed up the display. It work great when
there is only one active window but when ther is several display it
dosn’t: depending how i set “SDL_WINDOWID” it crash or do all the
display in the same windows.

My first question: is is possible to do this?
My second: if yes, what should i do?

Thank's,
Franck-- 

Franck SICARD <Franck.Sicard at 3demi.net> http://3demi.net/
PGP key=DFDFA865 fingerprint=8E2E 167E 9503 461B AD76 D962 2EEE 9869 DFDF A865
-------------- next part --------------
A non-text attachment was scrubbed…
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: Digital signature
URL: http://lists.libsdl.org/pipermail/sdl-libsdl.org/attachments/20031116/fe9430be/attachment.pgp

That topic was discussed a month ago or so on this list, check the archive.

My first question: is is possible to do this?

Some guy posted example code how to do several SDL windows with the FLTK
toolkit. I managed to adjust the code for wxWindows (my app does several
windows with each one SDL surface). I guess it should be possible to do
the same with Qt.

My second: if yes, what should i do?

Check the above mentioned FLTK example in the archive.

In short, you do not embed a SDL_Surface via the SDL_WINDOWID hack but
simply paint your stuff on a “hidden” SDL_Surface in memory and let your
GUI toolkit draw the pixel data from the surface into its own window. Of
course this will slow things down as there is an extra step involved as
the SDL_Surface is not directly rendered, but this should be minimal. In
wxWindows it works quite smooth, though, as one can create a bitmap from
memory (the SDL surface pixel data) and render that bitmap in a window,
it doesn’t even need to copy pixels as the original SDL pixel data is
used, but this might not be possible with all GUI toolkits. I suppose
this should be doable with Qt in a smiliar approach, too. I don’t know
Qt well enough to tell you details on how exactly to do this. Check the
API doc.

Peter

Check the above mentioned FLTK example in the archive.

Thank’s for the info, i will search the archive.

In short, you do not embed a SDL_Surface via the SDL_WINDOWID hack but
simply paint your stuff on a “hidden” SDL_Surface in memory and let your
GUI toolkit draw the pixel data from the surface into its own window. Of

Franck-- 

Franck SICARD <Franck.Sicard at 3demi.net> http://3demi.net/
PGP key=DFDFA865 fingerprint=8E2E 167E 9503 461B AD76 D962 2EEE 9869 DFDF A865
-------------- next part --------------
A non-text attachment was scrubbed…
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: Digital signature
URL: http://lists.libsdl.org/pipermail/sdl-libsdl.org/attachments/20031117/22672918/attachment.pgp