SDL-2.0.4 / SDL_WindowFrom / SDL_CreateRenderer() Hanging |
IshtarUK
|
Is there anybody that can offer help with my problem?
Kind Regards Amanda |
|||||||||||
|
IshtarUK
|
I am desperate to get this problem solved but if my question is silly, rather than ignoring me, please let me know so that I can rephrase my question. This is my second post with regards to this problem but despite hundreds of views there has been no reply. I fully understand that respondents are volunteers and appreciate any offer of help.
I would be grateful to hear from any body that could offer even the slightest insight into this issue. I have recompiled wxWidgets 3.1 against GTK-2 but making a call to: SDL_Window *sdl_window = SDL_CreateWindowFrom((void*) panel->GetHandle()); causes the following message: : Gdk-ERROR **: The program 'program name' received an X Window System error. This probably reflects a bug in the program. The error was 'BadWindow (invalid Window parameter)'. (Details: serial 138 error_code 3 request_code 20 minor_code 0) (Note to programmers: normally, X errors are reported asynchronously; that is, you will receive the error a while after causing it. To debug your program, run it with the --sync command line option to change this behavior. You can then get a meaningful backtrace from your debugger if you break on the gdk_x_error() function.) RUN FINISHED; Trace/breakpoint trap; core dumped; real time: 700ms; user: 20ms; system: 70ms When compiled against GTK3 the above error goes away but SDL_CreateRenderer(window, -1, SD_RENDERER_ACCELERATED) never returns. I.E. It seems to hang... Many thanks Amanda |
|||||||||||
|
capehill
|
I am not using SDL2 on Linux at the moment but I searched for what wxWidget::GetHandle() possibly does, and it looks like it doesn't return any "window" pointer, but perhaps a GtkWidget pointer. If this is true you may need to find out a way to get that window pointer.
|
|||||||||||
|
IshtarUK
|
Dear Capehill
I cannot thank you enough. I was assuming (a rather silly thing to do) that ::GetHandler() was returning a native XID. It wasn't. For the benefit of anybody else trying to embed SDL2 into wxWidgets here is my example code.
And then, in a separate thread loop with the usual SDL_Renderer functions
Once again, thank you Capehill |
|||||||||||||||
|