Gtk+sdl

Is it possible to draw SDL Surface on two differents SDL_WINDOWID ?

Thanks

Oche Satriani wrote:

Is it possible to draw SDL Surface on two differents SDL_WINDOWID ?

No, at least with SDL 1.2 all your SDL operations are bound to the
SDL_WINDOWID you specify BEFORE SDL_Init(), so you cannot do things like:

putenv(“SDL_WINDOWID=myfirstwinid”)

video = SDL_SetVideoMode(…)

SDL_BlitSurface(surf -> video)

putenv(“SDL_WINDOWID=mysecondwinid”)

(1)

video = SDL_SetVideoMode(…)

SDL_BlitSurface(surf -> video)

(1) AFAIK You can do it only if you do SDL_Quit( SDL_INIT_VIDEO ) and a
new SDL_Init(SDL_INIT_VIDEO) here, BUT, your first window will not
respond to expose, resize or other events…

Bye,
Gabry

Hello !

Is it possible to draw SDL Surface on two differents SDL_WINDOWID ?

No, but a solution would be to use SDL
only as a blitting eninge. Most GUI Toolkits have
some kind of draw_bitmap function that lets you draw
the SDL bitmaps into a window, widget whatever.

It is not GTK related, but you can get an idea
what i mean here :

http://www.syntheticsw.com/~wizard/projects/multiwin/multiwin-0.0.2.tar.gz

CU