Switched from SDL_WindowID and SDL_TextureID to SDL_Window* and SDL_Texture* for code simplicity and improved performance.
--HG-- extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%404438
This commit is contained in:
parent
d7496843fc
commit
a0e019f786
73 changed files with 854 additions and 1068 deletions
|
@ -221,7 +221,7 @@ static void
|
|||
X11_GL_InitExtensions(_THIS)
|
||||
{
|
||||
Display *display = ((SDL_VideoData *) _this->driverdata)->display;
|
||||
int screen = ((SDL_DisplayData *) SDL_CurrentDisplay.driverdata)->screen;
|
||||
int screen = ((SDL_DisplayData *) SDL_CurrentDisplay->driverdata)->screen;
|
||||
XVisualInfo *vinfo;
|
||||
XSetWindowAttributes xattr;
|
||||
Window w;
|
||||
|
@ -394,8 +394,7 @@ X11_GL_CreateContext(_THIS, SDL_Window * window)
|
|||
SDL_WindowData *data = (SDL_WindowData *) window->driverdata;
|
||||
Display *display = data->videodata->display;
|
||||
int screen =
|
||||
((SDL_DisplayData *) SDL_GetDisplayFromWindow(window)->
|
||||
driverdata)->screen;
|
||||
((SDL_DisplayData *) window->display->driverdata)->screen;
|
||||
XWindowAttributes xattr;
|
||||
XVisualInfo v, *vinfo;
|
||||
int n;
|
||||
|
@ -403,7 +402,7 @@ X11_GL_CreateContext(_THIS, SDL_Window * window)
|
|||
|
||||
/* We do this to create a clean separation between X and GLX errors. */
|
||||
XSync(display, False);
|
||||
XGetWindowAttributes(display, data->window, &xattr);
|
||||
XGetWindowAttributes(display, data->xwindow, &xattr);
|
||||
v.screen = screen;
|
||||
v.visualid = XVisualIDFromVisual(xattr.visual);
|
||||
vinfo = XGetVisualInfo(display, VisualScreenMask | VisualIDMask, &v, &n);
|
||||
|
@ -492,7 +491,7 @@ X11_GL_MakeCurrent(_THIS, SDL_Window * window, SDL_GLContext context)
|
|||
{
|
||||
Display *display = ((SDL_VideoData *) _this->driverdata)->display;
|
||||
Window drawable =
|
||||
(window ? ((SDL_WindowData *) window->driverdata)->window : None);
|
||||
(window ? ((SDL_WindowData *) window->driverdata)->xwindow : None);
|
||||
GLXContext glx_context = (GLXContext) context;
|
||||
int status;
|
||||
|
||||
|
@ -560,7 +559,7 @@ X11_GL_SwapWindow(_THIS, SDL_Window * window)
|
|||
SDL_WindowData *data = (SDL_WindowData *) window->driverdata;
|
||||
Display *display = data->videodata->display;
|
||||
|
||||
_this->gl_data->glXSwapBuffers(display, data->window);
|
||||
_this->gl_data->glXSwapBuffers(display, data->xwindow);
|
||||
}
|
||||
|
||||
void
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue