comparison src/video/x11/SDL_x11window.c @ 4591:1e998db9b597

Implement blending modes for textures. Fix off-screen pixmaps to be ARGB rather than RGB to enable blending across frames. Clear the screen and off-screen pixmaps when the renderer is created.
author Sunny Sachanandani <sunnysachanandani@gmail.com>
date Wed, 14 Jul 2010 19:17:11 +0530
parents 1ad70fb49fcb
children 844b5ef4b149
comparison
equal deleted inserted replaced
4590:1ad70fb49fcb 4591:1e998db9b597
511 } else if (window->y == SDL_WINDOWPOS_UNDEFINED) { 511 } else if (window->y == SDL_WINDOWPOS_UNDEFINED) {
512 y = 0; 512 y = 0;
513 } else { 513 } else {
514 y = window->y; 514 y = window->y;
515 } 515 }
516 #ifdef SDL_VIDEO_DRIVER_X11_XRENDER
517 xattr.background_pixel = 0xFF000000;
518 #endif
519 516
520 w = XCreateWindow(data->display, 517 w = XCreateWindow(data->display,
521 RootWindow(data->display, displaydata->screen), x, y, 518 RootWindow(data->display, displaydata->screen), x, y,
522 window->w, window->h, 0, depth, InputOutput, visual, 519 window->w, window->h, 0, depth, InputOutput, visual,
523 (CWOverrideRedirect | CWBackPixel | CWBorderPixel | 520 (CWOverrideRedirect | CWBackPixel | CWBorderPixel |
524 CWColormap), &xattr); 521 CWColormap), &xattr);
525 if (!w) { 522 if (!w) {
526 SDL_SetError("Couldn't create window"); 523 SDL_SetError("Couldn't create window");
527 return -1; 524 return -1;
528 } 525 }
526 /*#ifdef SDL_VIDEO_DRIVER_X11_XRENDER
527 //XSetWindowBackground(data->display, w, 0xFF000000);
528 //XSetWindowBackgroundPixmap(data->display, w, ParentRelative);
529 #endif*/
529 #if SDL_VIDEO_DRIVER_PANDORA 530 #if SDL_VIDEO_DRIVER_PANDORA
530 /* Create the GLES window surface */ 531 /* Create the GLES window surface */
531 _this->gles_data->egl_surface = 532 _this->gles_data->egl_surface =
532 _this->gles_data->eglCreateWindowSurface(_this->gles_data-> 533 _this->gles_data->eglCreateWindowSurface(_this->gles_data->
533 egl_display, 534 egl_display,