[SDL] SDL_WINDOWID: embedding SDL into gtkmm
Germán Diago
germandiago at gmail.com
Fri Sep 14 02:21:28 PDT 2007
Hello. I'm trying to embed an SDL_Window into my own application.
My way to (try) to do it is like this.
(window is a GtkWindow)
void onGtkWindowRealized()
{
unsigned long wid = GDK_WINDOW_XWINDOW(window_.gobj()->window);
std::stringstream sdlhack << "SDL_WINDOWID=" << wid;
putenv(const_cast<const char *>(sdlhack.str().c_str());
if (SDL_Init(SDL_INIT_VIDEO) != 0)
....
else
SDL_SetVideoMode(.....)
}
I think that this way SDL should draw into my own application window, like
described in a lot of mailing lists I googled.
But I get an SDL toplevel window instead. So I have my app's window and an
SDL one. I checked if the variable is
correctly set up, and it is. So... could anyone help on this, please.
Thank you very much in advance.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.libsdl.org/pipermail/sdl-libsdl.org/attachments/20070914/cb2e22bc/attachment.html
More information about the SDL
mailing list