Added test program for SDL_CreateWindowFrom()
Make sure OpenGL library is loaded before working with OpenGL windows, even those created with SDL_CreateWindowFrom() --HG-- extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%403521
This commit is contained in:
parent
0f598a332f
commit
2aab251e38
19 changed files with 514 additions and 288 deletions
|
@ -188,9 +188,6 @@ X11_CreateWindow(_THIS, SDL_Window * window)
|
|||
if (window->flags & SDL_WINDOW_OPENGL) {
|
||||
XVisualInfo *vinfo;
|
||||
|
||||
if (X11_GL_Initialize(_this) < 0) {
|
||||
return -1;
|
||||
}
|
||||
vinfo = X11_GL_GetVisual(_this, data->display, displaydata->screen);
|
||||
if (!vinfo) {
|
||||
return -1;
|
||||
|
@ -461,11 +458,6 @@ X11_CreateWindow(_THIS, SDL_Window * window)
|
|||
(CWOverrideRedirect | CWBackPixel | CWBorderPixel |
|
||||
CWColormap), &xattr);
|
||||
if (!w) {
|
||||
#ifdef SDL_VIDEO_OPENGL_GLX
|
||||
if (window->flags & SDL_WINDOW_OPENGL) {
|
||||
X11_GL_Shutdown(_this);
|
||||
}
|
||||
#endif
|
||||
SDL_SetError("Couldn't create window");
|
||||
return -1;
|
||||
}
|
||||
|
@ -622,11 +614,6 @@ X11_CreateWindow(_THIS, SDL_Window * window)
|
|||
XSetWMProtocols(data->display, w, &data->WM_DELETE_WINDOW, 1);
|
||||
|
||||
if (SetupWindowData(_this, window, w, SDL_TRUE) < 0) {
|
||||
#ifdef SDL_VIDEO_OPENGL_GLX
|
||||
if (window->flags & SDL_WINDOW_OPENGL) {
|
||||
X11_GL_Shutdown(_this);
|
||||
}
|
||||
#endif
|
||||
XDestroyWindow(data->display, w);
|
||||
return -1;
|
||||
}
|
||||
|
@ -942,11 +929,6 @@ X11_DestroyWindow(_THIS, SDL_Window * window)
|
|||
}
|
||||
}
|
||||
}
|
||||
#ifdef SDL_VIDEO_OPENGL_GLX
|
||||
if (window->flags & SDL_WINDOW_OPENGL) {
|
||||
X11_GL_Shutdown(_this);
|
||||
}
|
||||
#endif
|
||||
#ifdef X_HAVE_UTF8_STRING
|
||||
if (data->ic) {
|
||||
XDestroyIC(data->ic);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue